Andrewid the Android is a galaxy-known detective. Now he is preparing a defense against a possible attack by hackers on a major computer network.

In this network are n vertices, some pairs of vertices are connected by m undirected channels. It is planned to transfer q important messages via this network, the i-th of which must be sent from vertex si to vertex di via one or more channels, perhaps through some intermediate vertices.

To protect against attacks a special algorithm was developed. Unfortunately it can be applied only to the network containing directed channels. Therefore, as new channels can't be created, it was decided for each of the existing undirected channels to enable them to transmit data only in one of the two directions.

Your task is to determine whether it is possible so to choose the direction for each channel so that each of the q messages could be successfully transmitted.

Input

The first line contains three integers n, m and q (1 ≤ n, m, q ≤ 2·105) — the number of nodes, channels and important messages.

Next m lines contain two integers each, vi and ui (1 ≤ vi, ui ≤ n, vi ≠ ui), that means that between nodes vi and ui is a channel. Between a pair of nodes can exist more than one channel.

Next q lines contain two integers si and di (1 ≤ si, di ≤ n, si ≠ di) — the numbers of the nodes of the source and destination of the corresponding message.

It is not guaranteed that in it initially possible to transmit all the messages.

Output

If a solution exists, print on a single line "Yes" (without the quotes). Otherwise, print "No" (without the quotes).

Examples

Input

4 4 2
1 2
1 3
2 3
3 4
1 3
4 2


Output

Yes


Input

3 2 2
1 2
3 2
1 3
2 1


Output

No


Input

3 3 2
1 2
1 2
3 2
1 3
2 1


Output

Yes

Note

In the first sample test you can assign directions, for example, as follows: 1 → 2, 1 → 3, 3 → 2, 4 → 3. Then the path for for the first message will be 1 → 3, and for the second one — 4 → 3 → 2.

In the third sample test you can assign directions, for example, as follows: 1 → 2, 2 → 1, 2 → 3. Then the path for the first message will be 1 → 2 → 3, and for the second one — 2 → 1.
#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
struct aaa {
  int x, y;
} a[1000001];
int hh, n, m, sz, flag, cnt, t1, tot, sta[1000001], e[1000001], nt[1000001],
    hd[1000001], low[1000001], dfn[1000001], v[1000001], val[1000001],
    b[1000001], dep[1000001], f[200001][21], g1[1000001], g2[1000001];
void build(int x, int y, int w) {
  tot++;
  e[tot] = y;
  val[tot] = w;
  nt[tot] = hd[x];
  hd[x] = tot;
}
void dfs(int x, int fa, int now) {
  v[x] = 1;
  int i;
  dfn[x] = low[x] = ++cnt;
  sta[++sta[0]] = x;
  for (i = hd[x]; i; i = nt[i]) {
    if (now == val[i]) continue;
    if (!dfn[e[i]])
      dfs(e[i], x, val[i]), low[x] = min(low[x], low[e[i]]);
    else
      low[x] = min(low[x], dfn[e[i]]);
  }
  if (low[x] >= dfn[x]) {
    sz++;
    while (sta[sta[0]] != x) {
      b[sta[sta[0]]] = sz;
      sta[0]--;
    }
    sta[0]--;
    b[x] = sz;
  }
}
void dfs1(int x, int fa, int now) {
  int i;
  v[x] = 1;
  dep[x] = now;
  for (i = hd[x]; i; i = nt[i]) {
    if (e[i] == fa) continue;
    f[e[i]][0] = x;
    dfs1(e[i], x, now + 1);
  }
}
int get(int x, int y) {
  int i;
  if (dep[x] < dep[y]) swap(x, y);
  for (i = 18; i >= 0; i--)
    if (dep[f[x][i]] >= dep[y]) x = f[x][i];
  if (x == y) return x;
  for (i = 18; i >= 0; i--)
    if (f[x][i] != f[y][i]) x = f[x][i], y = f[y][i];
  return f[x][0];
}
void pd(int x, int fa) {
  v[x] = 1;
  int i;
  for (i = hd[x]; i; i = nt[i]) {
    if (e[i] == fa) continue;
    pd(e[i], x);
    if (flag) return;
    g1[x] += g1[e[i]];
    g2[x] += g2[e[i]];
  }
  if (g1[x] && g2[x]) {
    flag = 1;
  }
}
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int main() {
  int x, y, i, j, lca;
  scanf("%d%d%d", &n, &m, &t1);
  for (i = 1; i <= m; i++) {
    x = read();
    y = read();
    build(x, y, i);
    build(y, x, i);
    a[i].x = x;
    a[i].y = y;
  }
  for (i = 1; i <= n; i++)
    if (!v[i]) cnt = 0, dfs(i, 0, 0);
  for (i = 1; i <= n; i++) hd[i] = 0;
  tot = 0;
  for (i = 1; i <= m; i++)
    if (b[a[i].x] != b[a[i].y]) {
      build(b[a[i].x], b[a[i].y], 0), build(b[a[i].y], b[a[i].x], 0);
    }
  for (i = 1; i <= sz; i++) v[i] = 0;
  for (i = 1; i <= sz; i++)
    if (!v[i]) dfs1(i, 0, 1);
  for (j = 1; j <= 18; j++)
    for (i = 1; i <= sz; i++) f[i][j] = f[f[i][j - 1]][j - 1];
  for (i = 1; i <= t1; i++) {
    x = read();
    y = read();
    if (b[x] == b[y]) continue;
    lca = get(b[x], b[y]);
    if (!lca) {
      puts("No");
      return 0;
    }
    g1[b[x]]++;
    g1[lca]--;
    g2[b[y]]++;
    g2[lca]--;
  }
  for (i = 1; i <= sz; i++) v[i] = 0;
  for (i = 1; i <= sz; i++)
    if (!v[i]) pd(i, 0);
  if (flag)
    puts("No");
  else
    puts("Yes");
}
