initialising tree
v [ 1 ] . push_back ( make_pair ( 4 , 4 ) ) ; v [ 4 ] . push_back ( make_pair ( 1 , 4 ) ) ; v [ 1 ] . push_back ( make_pair ( 2 , 2 ) ) ; v [ 2 ] . push_back ( make_pair ( 1 , 2 ) ) ; v [ 2 ] . push_back ( make_pair ( 3 , 3 ) ) ; v [ 3 ] . push_back ( make_pair ( 2 , 3 ) ) ; v [ 2 ] . push_back ( make_pair ( 5 , 5 ) ) ; v [ 5 ] . push_back (