Problem: After a revolution in Berland the new dictator faced an unexpected challenge: the country has to be somehow ruled. The dictator is a very efficient manager, yet he can't personally give orders to each and every citizen. That's why he decided to pick some set of leaders he would control. Those leaders will directly order the citizens. However, leadership efficiency turned out to vary from person to person (i.e. while person A makes an efficient leader, person B may not be that good at it). That's why the dictator asked world-famous berland scientists for help. The scientists suggested an innovatory technology — to make the leaders work in pairs.

A relationship graph is some undirected graph whose vertices correspond to people. A simple path is a path with no repeated vertices. Long and frighteningly expensive research showed that a pair of people has maximum leadership qualities if a graph of relationships has a simple path between them with an odd number of edges. The scientists decided to call such pairs of different people leader pairs. Secret services provided the scientists with the relationship graph so that the task is simple — we have to learn to tell the dictator whether the given pairs are leader pairs or not. Help the scientists cope with the task.

Input

The first line contains integers n and m (1 ≤ n ≤ 105, 0 ≤ m ≤ 105) — the number of vertices and edges in the relationship graph correspondingly. Next m lines contain pairs of integers a and b which mean that there is an edge between the a-th and the b-th vertices (the vertices are numbered starting from 1, 1 ≤ a, b ≤ n). It is guaranteed that the graph has no loops or multiple edges.

Next line contains number q (1 ≤ q ≤ 105) — the number of pairs the scientists are interested in. Next q lines contain these pairs (in the same format as the edges, the queries can be repeated, a query can contain a pair of the identical vertices).

Output

For each query print on a single line "Yes" if there's a simple odd path between the pair of people; otherwise, print "No".

Examples

Input

7 7
1 3
1 4
2 3
2 4
5 6
6 7
7 5
8
1 2
1 3
1 4
2 4
1 5
5 6
5 7
6 7


Output

No
Yes
Yes
Yes
No
Yes
Yes
Yes

Note

Notes to the samples:

1) Between vertices 1 and 2 there are 2 different simple paths in total: 1-3-2 and 1-4-2. Both of them consist of an even number of edges. 

2) Vertices 1 and 3 are connected by an edge, that's why a simple odd path for them is 1-3.

5) Vertices 1 and 5 are located in different connected components, there's no path between them.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
struct Dj {
  unordered_map<int, int> a;
  int find(int x) { return a.count(x) ? (a[x] = find(a[x])) : x; }
  void merge(int x, int y) {
    x = find(x);
    y = find(y);
    if (x != y) a[x] = y;
  }
  bool same(int x, int y) {
    x = find(x);
    y = find(y);
    return x == y;
  }
};
Dj naive;
vector<int> adj[100000];
void add_edge(int a, int b) {
  naive.merge(2 * a, 2 * b + 1);
  naive.merge(2 * a + 1, 2 * b);
  adj[a].push_back(b);
  adj[b].push_back(a);
}
int depth[100000];
stack<int> torjanstack;
int n2;
vector<int> adj2[200000];
bool isstar[200000];
void handle_bcc(const vector<int> &bcc) {
  Dj dj;
  for (int x : bcc)
    for (int c : adj[x]) {
      dj.merge(2 * x, 2 * c + 1);
      dj.merge(2 * c, 2 * x + 1);
    }
  int ref = bcc.front();
  if (dj.same(2 * ref, 2 * ref + 1)) {
    int star = n2++;
    isstar[star] = true;
    for (int x : bcc) {
      adj2[x].push_back(star);
      adj2[star].push_back(x);
    }
  } else {
    int even = n2++;
    int odd = n2++;
    adj2[even].push_back(odd);
    adj2[odd].push_back(even);
    for (int x : bcc) {
      int y = dj.same(2 * ref, 2 * x) ? even : odd;
      adj2[x].push_back(y);
      adj2[y].push_back(x);
    }
  }
}
int torjan(int x, int p) {
  depth[x] = p == -1 ? 1 : depth[p] + 1;
  int mind = depth[x];
  torjanstack.push(x);
  for (int c : adj[x]) {
    if (c == p) continue;
    if (depth[c]) {
      mind = min(mind, depth[c]);
      continue;
    }
    int cd = torjan(c, x);
    if (cd > depth[x]) {
      adj2[x].push_back(c);
      adj2[c].push_back(x);
      continue;
    }
    if (cd < depth[x]) {
      mind = min(mind, cd);
      continue;
    }
    vector<int> bcc;
    int y;
    do {
      y = torjanstack.top();
      torjanstack.pop();
      bcc.push_back(y);
    } while (y != c);
    bcc.push_back(x);
    handle_bcc(bcc);
  }
  if (mind == depth[x]) torjanstack.pop();
  return mind;
}
int depth2[200000];
int anc[200000][18];
bool hasstar[200000][18];
void dfs(int x, int p) {
  if (p == -1) {
    anc[x][0] = x;
    depth2[x] = 1;
  } else {
    anc[x][0] = p;
    depth2[x] = depth2[p] + 1;
  }
  for (int c : adj2[x])
    if (c != p) dfs(c, x);
}
void preprocess(int n) {
  n2 = n;
  for (int i = 0; i < n; i++)
    if (depth[i] == 0) torjan(i, -1);
  for (int i = 0; i < n2; i++)
    if (depth2[i] == 0) dfs(i, -1);
  for (int i = 0; i < n2; i++) hasstar[i][0] = isstar[i];
  for (int i = 1; i < 18; i++)
    for (int j = 0; j < n2; j++) {
      int m = anc[j][i - 1];
      anc[j][i] = anc[m][i - 1];
      hasstar[j][i] = hasstar[j][i - 1] || hasstar[m][i - 1];
    }
}
bool query(int a, int b) {
  if (a == b || naive.find(2 * a) != naive.find(2 * b + 1)) return false;
  if ((depth2[a] + depth2[b]) % 2) return true;
  if (depth2[a] < depth2[b]) swap(a, b);
  for (int i = 0; i < 18; i++)
    if ((depth2[a] - depth2[b]) & (1 << i)) {
      if (hasstar[a][i]) return true;
      a = anc[a][i];
    }
  if (a == b) return false;
  for (int i = 18 - 1; i >= 0; i--) {
    if (anc[a][i] != anc[b][i]) {
      if (hasstar[a][i] || hasstar[b][i]) return true;
      a = anc[a][i];
      b = anc[b][i];
    }
  }
  return isstar[a] || isstar[b] || isstar[anc[a][0]];
}
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    a--, b--;
    add_edge(a, b);
  }
  preprocess(n);
  int q;
  scanf("%d", &q);
  for (int i = 0; i < q; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    a--, b--;
    puts(query(a, b) ? "Yes" : "No");
  }
}