#include <bits/stdc++.h>
using namespace std;
int a[200005], b[200005];
struct dsu {
  int p[400005], r[400005];
  void init(int n) {
    for (int i = 1; i <= n; i++) {
      p[i] = i;
      r[i] = 0;
    }
  }
  int root(int a) { return p[a] == a ? a : root(p[a]); }
  bool merge(int a, int b, vector<pair<int, int> > &tmp1,
             vector<pair<int, int> > &tmp2) {
    a = root(a);
    b = root(b);
    if (a == b) return 0;
    if (r[a] < r[b]) swap(a, b);
    tmp1.push_back(make_pair(b, p[b]));
    p[b] = a;
    if (r[a] == r[b]) {
      tmp2.push_back(make_pair(a, r[a]));
      r[a]++;
    }
    return 1;
  }
  void rollback(vector<pair<int, int> > &a, vector<pair<int, int> > &b) {
    reverse((a).begin(), (a).end());
    reverse((b).begin(), (b).end());
    for (auto &i : a) p[i.first] = i.second;
    for (auto &i : b) r[i.first] = i.second;
  }
} dsu;
int R[200005];
int n, m, q;
void rec(int s, int e, int r, bool Q) {
  if (!Q) {
    for (int i = s; i <= e; i++) R[i] = r;
    return;
  }
  if (s > e) return;
  int mid = (s + e) / 2;
  vector<pair<int, int> > tmp1, tmp2;
  for (int i = s; i < mid; i++) {
    dsu.merge(a[i], b[i] + n, tmp1, tmp2);
    dsu.merge(b[i], a[i] + n, tmp1, tmp2);
    if (dsu.root(a[i]) == dsu.root(a[i] + n)) {
      Q = 0;
      break;
    }
    if (dsu.root(b[i]) == dsu.root(b[i] + n)) {
      Q = 0;
      break;
    }
  }
  if (!Q) {
    for (int i = mid; i <= e; i++) R[i] = r;
    dsu.rollback(tmp1, tmp2);
    rec(s, mid - 1, r, 1);
    return;
  } else {
    int i = r;
    for (i = r;; i--) {
      dsu.merge(a[i], b[i] + n, tmp1, tmp2);
      dsu.merge(b[i], a[i] + n, tmp1, tmp2);
      if (dsu.root(a[i]) == dsu.root(a[i] + n)) {
        Q = 0;
        break;
      }
      if (dsu.root(b[i]) == dsu.root(b[i] + n)) {
        Q = 0;
        break;
      }
    }
    R[mid] = i - 1;
    dsu.rollback(tmp1, tmp2);
  }
  tmp1.clear(), tmp2.clear();
  for (int i = r; i >= R[mid] + 2; i--) {
    dsu.merge(a[i], b[i] + n, tmp1, tmp2);
    dsu.merge(b[i], a[i] + n, tmp1, tmp2);
  }
  rec(s, mid - 1, R[mid] + 1, 1);
  dsu.rollback(tmp1, tmp2);
  tmp1.clear(), tmp2.clear();
  Q = 1;
  for (int i = s; i <= mid; i++) {
    dsu.merge(a[i], b[i] + n, tmp1, tmp2);
    dsu.merge(b[i], a[i] + n, tmp1, tmp2);
    if (dsu.root(a[i]) == dsu.root(a[i] + n)) {
      Q = 0;
      break;
    }
    if (dsu.root(b[i]) == dsu.root(b[i] + n)) {
      Q = 0;
      break;
    }
  }
  rec(mid + 1, e, r, Q);
  dsu.rollback(tmp1, tmp2);
}
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i <= m; i++) scanf("%d%d", &a[i], &b[i]);
  dsu.init(n + n);
  vector<pair<int, int> > tmp1, tmp2;
  for (int i = 1; i <= m; i++) {
    dsu.merge(a[i], b[i] + n, tmp1, tmp2);
    dsu.merge(b[i], a[i] + n, tmp1, tmp2);
  }
  bool ok = 1;
  for (int i = 1; i <= n; i++) {
    if (dsu.root(i) == dsu.root(i + n)) ok = 0;
  }
  if (ok) {
    for (int i = 1; i <= q; i++) {
      int l, r;
      scanf("%d%d", &l, &r);
      printf("NO\n");
    }
    return 0;
  }
  dsu.init(n + n);
  rec(1, m, m, 1);
  for (int i = 1; i <= q; i++) {
    int l, r;
    scanf("%d%d", &l, &r);
    if (R[l] >= r)
      printf("YES\n");
    else
      printf("NO\n");
  }
}
