#include <bits/stdc++.h>
using namespace std;
int u[200000], v[200000];
int ll[200000];
pair<int, int> parent[200000];
int size[200000];
pair<int, int> find(int n) {
  if (parent[n].first != n) {
    pair<int, int> p = find(parent[n].first);
    return make_pair(p.first, p.second ^ parent[n].second);
  } else
    return parent[n];
}
vector<pair<int, int> > added;
int addEdge(int u, int v) {
  int w = 1;
  pair<int, int> pu = find(u), pv = find(v);
  w ^= pu.second ^ pv.second;
  u = pu.first, v = pv.first;
  if (u == v) {
    if (w == 1) return 0;
  } else {
    if (size[u] > size[v]) swap(u, v);
    parent[u] = make_pair(v, w), size[v] += size[u];
    added.push_back(make_pair(u, v));
  }
  return 1;
}
int findAns(int l, int r, int s, int e, int b) {
  if (l > r)
    return 0;
  else if (!b) {
    fill(ll + l, ll + r + 1, s);
    return 0;
  }
  int i;
  int m = (l + r) / 2;
  int bb = b, p1 = added.size();
  for (i = r; i > m; i--) bb &= addEdge(u[i], v[i]);
  int bbb = bb, p2 = added.size();
  i = s + 1;
  while ((i <= e) && (i <= m) && bbb) bbb &= addEdge(u[i], v[i]), i++;
  ll[m] = i - 1;
  while (added.size() > p2) {
    parent[added.back().first] = make_pair(added.back().first, 0);
    size[added.back().second] -= size[added.back().first];
    added.pop_back();
  }
  bb &= addEdge(u[m], v[m]);
  findAns(l, m - 1, s, ll[m], bb);
  while (added.size() > p1) {
    parent[added.back().first] = make_pair(added.back().first, 0);
    size[added.back().second] -= size[added.back().first];
    added.pop_back();
  }
  bb = b;
  for (i = s + 1; i <= ll[m]; i++) bb &= addEdge(u[i], v[i]);
  findAns(m + 1, r, ll[m], e, bb);
  return 0;
}
int main() {
  int i;
  int N, M, Q;
  scanf("%d %d %d", &N, &M, &Q);
  for (i = 0; i < M; i++) scanf("%d %d", &u[i], &v[i]), u[i]--, v[i]--;
  for (i = 0; i < N; i++) parent[i] = make_pair(i, 0), size[i] = 1;
  findAns(0, M - 1, -1, M - 1, 1);
  int l, r;
  for (i = 0; i < Q; i++) {
    scanf("%d %d", &l, &r);
    l--, r--;
    printf((l <= ll[r]) ? "NO\n" : "YES\n");
  }
  return 0;
}
