#include <bits/stdc++.h>
#pragma GCC optimize("O2")
using namespace std;
const int N = 2e5 + 10;
const long long mod = 1e9 + 7;
const long long mod2 = 998244353;
const long long inf = 8e18;
const int LOG = 22;
long long pw(long long a, long long b, long long M) {
  return (!b ? 1
             : (b & 1 ? (a * pw(a * a % M, b / 2, M)) % M
                      : pw(a * a % M, b / 2, M)));
}
struct dsu {
  int bads, par[N], Xor[N], sz[N];
  vector<pair<int, int> > hist;
  vector<int> vec;
  void init() {
    for (int i = 1; i < N; i++) par[i] = i, Xor[i] = 0, sz[i] = 1;
    bads = 0;
    hist.clear();
    vec.clear();
  }
  pair<int, int> get(int x) {
    if (x == par[x]) {
      return make_pair(x, 0);
    }
    pair<int, int> cu = get(par[x]);
    cu.second ^= Xor[x];
    return cu;
  }
  void unify(int v, int u) {
    pair<int, int> V = get(v), U = get(u);
    if (sz[V.first] < sz[U.first]) swap(u, v), swap(U, V);
    if (V.first == U.first) {
      hist.push_back(make_pair(0, 0));
      if (V.second == U.second) {
        bads++;
        vec.push_back(1);
      } else
        vec.push_back(0);
      return;
    }
    par[U.first] = V.first;
    hist.push_back(make_pair(U.first, V.first));
    vec.push_back(0);
    sz[V.first] += sz[U.first];
    if (V.second == U.second) {
      Xor[U.first] ^= 1;
    }
  }
  void undo() {
    if (hist.empty()) {
      printf("this is fucked up!\n");
      return;
    }
    pair<int, int> cu = hist.back();
    bads -= vec.back();
    vec.pop_back(), hist.pop_back();
    par[cu.first] = cu.first;
    sz[cu.second] -= sz[cu.first];
    Xor[cu.first] = 0;
  }
} D;
int n, m, q, fir[N], sec[N], dp[N];
pair<int, int> E[N];
void solve(int l, int r, int le) {
  if (l > r) return;
  int mid = (l + r) >> 1, ptr = le;
  for (int i = r; i > mid; i--) {
    D.unify(E[i].first, E[i].second);
  }
  while (D.bads == 0) {
    D.unify(E[ptr].first, E[ptr].second);
    ptr++;
  }
  dp[mid] = ptr;
  for (int i = 0; i < ptr - le; i++) D.undo();
  D.unify(E[mid].first, E[mid].second);
  solve(l, mid - 1, le);
  D.undo();
  for (int i = mid + 1; i <= r; i++) D.undo();
  for (int i = le; i < ptr; i++) {
    D.unify(E[i].first, E[i].second);
  }
  solve(mid + 1, r, ptr);
  for (int i = 0; i < ptr - le; i++) D.undo();
}
int main() {
  scanf("%d%d%d", &n, &m, &q);
  D.init();
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &E[i].first, &E[i].second);
    D.unify(E[i].first, E[i].second);
  }
  for (int i = 1; i <= q; i++) {
    scanf("%d%d", &fir[i], &sec[i]);
  }
  if (D.bads == 0) {
    for (int i = 1; i <= q; i++) {
      printf("NO\n");
    }
    return 0;
  }
  D.init();
  solve(1, m, 1);
  for (int i = 1; i <= q; i++) {
    if (dp[sec[i]] <= fir[i]) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  return 0;
}
