v,e,s,g = map(int,input().split()) se = set() for _ in range(e): a,b=map(int,input().split()) if a>b:a,b=b,a assert (a,b) not in se se.add((a,b))