class unif: def __init__(self,n): self.pare=[-1]*n self.size=[1]*n def root(self,x): while self.pare[x]!=-1: x=self.pare[x] return x def unite(self,u,v): rootu=self.root(u) rootv=self.root(v) if rootu!=rootv: if self.size[rootu]>=self.size[rootv]: self.pare[rootv]=rootu self.size[rootu]+=self.size[rootv] else: self.pare[rootu]=rootv self.size[rootv]+=self.size[rootu] def same(self,s,t): return self.root(s)==self.root(t) N,M=map(int,input().split()) s,t,K=map(int,input().split()) G=[[] for i in range(N)] Z=unif(N) for i in range(M): a,b=map(int,input().split()) G[a-1].append(b-1) G[b-1].append(a-1) Z.unite(a-1,b-1) if Z.same(s-1,t-1)==False: print('Unknown') exit() dist=[-1]*N from collections import deque S=deque() p=[[0]*N for i in range(20)] for i in range(N): if dist[i]>=0: continue dist[i]=0 S.append(i) p[0][i]=i while S: x=S.popleft() for y in G[x]: if dist[y]>=0: continue dist[y]=dist[x]+1 p[0][y]=x S.append(y) for k in range(1,20): for i in range(N): p[k][i]=p[k-1][p[k-1][i]] def LCA(x,y): a,b=x,y if dist[a]>dist[b]: a,b=b,a e=dist[b]-dist[a] for k in range(20): if (e>>k)&1: b=p[k][b] if a==b: return a for k in range(19,-1,-1): if p[k][a]!=p[k][b]: a=p[k][a] b=p[k][b] a=p[0][a] return a s-=1 t-=1 if K%2!=(dist[s]-dist[t])%2: print('No') exit() pos=LCA(s,t) d=dist[s]+dist[t]-2*dist[pos] if d>K: print('Unknown') else: print('Yes')