class Unionfind: def __init__(self,n): self.uf = [-1]*n def find(self,x): if self.uf[x] < 0: return x else: self.uf[x] = self.find(self.uf[x]) return self.uf[x] def same(self,x,y): return self.find(x) == self.find(y) def union(self,x,y): x = self.find(x) y = self.find(y) if x == y: return False if self.uf[x] > self.uf[y]: x,y = y,x self.uf[x] += self.uf[y] self.uf[y] = x return True def size(self,x): x = self.find(x) return -self.uf[x] def Lowlink(graph): n = len(graph) order = [-1]*n low = [n]*n par = [-1]*n vis = 0 for root in range(n): if order[root] != -1: continue q = [root] while q: now = q.pop() if now < 0: now = ~now if now == root: continue p = par[now] low[p] = min(low[p],low[now]) continue if order[now] >= 0: continue order[now] = vis low[now] = vis vis += 1 q.append(~now) check = 0 for nex in graph[now]: if par[now] == nex and check == 0: check += 1 continue elif order[nex] >= 0: if low[now] < 0 or order[nex] < low[now]: low[now] = order[nex] else: par[nex] = now q.append(nex) briges = [] for i in range(n): if par[i] < 0: continue if low[i] < 0 or low[i] > order[par[i]]: briges.append((i,par[i])) return briges n,m,q = map(int,input().split()) e = [[] for i in range(n)] for _ in range(m): u,v = [int(x)-1 for x in input().split()] e[u].append(v) e[v].append(u) briges = Lowlink(e) uf = Unionfind(n) for u,v in briges: uf.union(u,v) for _ in range(q): x,y = [int(i)-1 for i in input().split()] print("Yes" if uf.same(x,y) else "No")