import sys from collections import deque def main(): input = sys.stdin.read().split() ptr = 0 N = int(input[ptr]) ptr += 1 M = int(input[ptr]) ptr += 1 s = int(input[ptr]) ptr += 1 t = int(input[ptr]) ptr += 1 k = int(input[ptr]) ptr += 1 edges = [[] for _ in range(N+1)] for _ in range(M): a = int(input[ptr]) ptr += 1 b = int(input[ptr]) ptr += 1 edges[a].append(b) edges[b].append(a) # Compute bipartition and check for cycles color = [-1] * (N + 1) parent = [-1] * (N + 1) has_cycle = False for node in range(1, N+1): if color[node] == -1: q = deque() q.append(node) color[node] = 0 parent[node] = -1 while q: u = q.popleft() for v in edges[u]: if color[v] == -1: color[v] = color[u] ^ 1 parent[v] = u q.append(v) else: if v != parent[u]: has_cycle = True same_partition = (color[s] == color[t]) # Check parity if (same_partition and k % 2 != 0) or (not same_partition and k % 2 != 1): print("No") return # Compute minimal distance in F dist = [-1] * (N + 1) q = deque() q.append(s) dist[s] = 0 found = False while q and not found: u = q.popleft() for v in edges[u]: if dist[v] == -1: dist[v] = dist[u] + 1 q.append(v) if v == t: found = True break d = dist[t] # Check step 3a if d != -1: if s == t: if k >= 2 and k % 2 == 0: if has_cycle: print("Yes") return else: if k >= d and (k - d) % 2 == 0: print("Yes") return # Check step 3b if same_partition: if s == t: complete_exists = (k >= 2 and k % 2 == 0) else: complete_exists = (k >= 2 and k % 2 == 0) else: complete_exists = (k >= 1) if not complete_exists: print("No") else: print("Unknown") if __name__ == "__main__": main()