F=[-1]*7**6 b=1 for _ in[0]*int(input()):s,t=map(int,input().split());b&=F[s]in[-1,t];F[s]=t print("YNeos"[1-b::2])