#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
struct pdsu {
  vector<int> lab, off;
  vector<array<int, 4>> saved;
  void init(int n) {
    saved.clear();
    lab.assign(n + 5, -1);
    off.assign(n + 5, 0);
  }
  pair<int, int> finds(int u) {
    int now = 0;
    while (lab[u] >= 0) {
      now ^= off[u];
      u = lab[u];
    }
    return make_pair(u, now);
  }
  bool merges(int __u, int __v) {
    pair<int, int> x = finds(__u), y = finds(__v);
    if (x.first == y.first) {
      if (x.second == y.second) {
        return false;
      }
      return true;
    }
    if (lab[x.first] > lab[y.first]) swap(x, y);
    saved.push_back({x.first, y.first, lab[x.first], lab[y.first]});
    lab[x.first] += lab[y.first];
    lab[y.first] = x.first;
    off[y.first] = x.second ^ y.second ^ 1;
    return true;
  }
  void rollback(void) {
    auto a = saved.back();
    saved.pop_back();
    lab[a[0]] = a[2], lab[a[1]] = a[3];
  }
  void dbg(void) {
    for (int i = 1; i <= (int)lab.size() - 5; ++i) {
      cerr << finds(i).first << ' ';
    }
  }
} dsu;
void restore(int sz) {
  while (dsu.saved.size() > sz) {
    dsu.rollback();
  }
}
int U[maxn], V[maxn], op[maxn];
int N, M, Q;
void dnc(int l, int r, int opl, int opr) {
  if (l > r) return;
  auto add = [&](int i) {
    if (i == M + 1) return true;
    return dsu.merges(U[i], V[i]);
  };
  int mid = (l + r) / 2;
  int sz = dsu.saved.size();
  int res = -1;
  for (int i = l; i < mid; ++i) {
    if (!add(i)) {
      res = opr;
      assert(res == M + 1);
      break;
    }
  }
  int sz2 = dsu.saved.size();
  if (res == -1) {
    int i = opr;
    while (i > opl && add(i)) --i;
    res = i;
  }
  op[mid] = res;
  if (op[mid] != M + 1) {
    restore(sz2);
    if (add(mid))
      dnc(mid + 1, r, op[mid], opr);
    else {
      for (int i = mid + 1; i <= r; ++i) op[i] = M + 1;
    }
  } else {
    for (int i = mid + 1; i <= r; ++i) op[i] = M + 1;
  }
  restore(sz);
  for (int i = op[mid] + 1; i <= opr; ++i) assert(add(i));
  dnc(l, mid - 1, opl, op[mid]);
  restore(sz);
}
signed main(void) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> N >> M >> Q;
  dsu.init(N);
  for (int i = 1; i <= M; ++i) {
    cin >> U[i] >> V[i];
  }
  dnc(1, M, 1, M + 1);
  while (Q--) {
    int l, r;
    cin >> l >> r;
    if (r >= op[l])
      cout << "NO\n";
    else
      cout << "YES\n";
  }
}
