#include <bits/stdc++.h>
using namespace std;
const int maxn = 200020;
int n, m, q;
vector<int> v[maxn];
int up[maxn];
bool mark[maxn];
stack<int> st;
int h[maxn];
set<int> s[maxn], t[maxn];
bool FLAG = 0;
int po[maxn];
int merge(int a, int b) {
  if (a == b) return a;
  if (t[a].size() + s[a].size() > t[b].size() + s[b].size()) swap(a, b);
  while (s[a].size()) {
    int k = *s[a].begin();
    s[a].erase(k);
    if (t[b].find(k) != t[b].end())
      t[b].erase(k);
    else
      s[b].insert(k);
  }
  while (t[a].size()) {
    int k = *t[a].begin();
    t[a].erase(k);
    if (s[b].find(k) != s[b].end())
      s[b].erase(k);
    else
      t[b].insert(k);
  }
  return b;
}
void dfs(int x, int par) {
  if (FLAG) return;
  mark[x] = 1;
  st.push(x);
  h[x] = h[par] + 1;
  up[x] = h[x];
  bool didim = 0;
  for (int i = 0; i < v[x].size(); i++)
    if (v[x][i] != par || didim) {
      if (!mark[v[x][i]]) dfs(v[x][i], x);
      up[x] = min(up[x], up[v[x][i]]);
      po[x] = merge(po[x], po[v[x][i]]);
    } else
      didim = 1;
  if (up[x] == h[x])
    if (s[po[x]].size() && t[po[x]].size()) FLAG = 1;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m >> q;
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  for (int i = 1; i <= n; i++) po[i] = i;
  while (q--) {
    int x, y;
    cin >> x >> y;
    s[x].insert(q);
    t[y].insert(q);
  }
  for (int i = 1; i <= n; i++) {
    if (!mark[i]) dfs(i, 0);
    if (s[po[i]].size() || t[po[i]].size()) FLAG = 1;
  }
  if (FLAG)
    cout << "No" << endl;
  else
    cout << "Yes" << endl;
}
