#include <bits/stdc++.h>
#define int long long
#define ff first
#define ss second
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
using namespace std;
void solve() {
int n, m, q;
cin >> n >> m >> q;
int l[m], r[m];
vector <vector <int>> adj(n + 1);
for (int i = 0;i < m;i++) {
cin >> l[i] >> r[i];
adj[r[i]].push_back(l[i]);
}
vector <pair <int, int>> qs;
for (int i = 0;i < q;i++) {
int s, e;
cin >> s >> e;
qs.push_back({s, e});
}
bool pos[n + 1] = {0};
pos[0] = true;
for (int i = 1;i <= n;i++) {
for (auto x : adj[i]) {
if (pos[x - 1] == true) {
pos[i] = true;
break;
}
}
}
for (auto [x, y] : qs) {
if (pos[y] == true) {
cout << "YES\n";
}
else {
cout << "NO\n";
}
}
return;
}
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(NULL);
solve();
}