The Hidden Pair (Hard Version)

Problem Name:
The Hidden Pair (Hard Version)
Site:CodeForces
Links:
Tags:
Problem setters: