func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, m, q, dfn[200005], low[200005], ibcc[200005], dfncnt, bcccnt;   vector<pair<int, int>> g[200005];   vector<int> ng[200005];   int st[200005], stcnt;   void getbcc(int x, int pe) {     dfn[x] = low[x] = ++dfncnt;     st[stcnt++] = x;     for (pair<int, int> &e : g[x])       if (!dfn[e.first]) {         getbcc(e.first, e.second);         low[x] = min(low[x], low[e.first]);       } else if (e.second != pe) {         low[x] = min(low[x], dfn[e.first]);       }     if (dfn[x] == low[x]) {       ibcc[x] = ++bcccnt;       int y;       while ((y = st[--stcnt]) != x) {         ibcc[y] = bcccnt;       }     }   }   int dep[200005];   int fa[200005][18];   bool vis[200005];   void dfs4lca(int x, int p, int cd) {     vis[x] = 1;     fa[x][0] = p;     dep[x] = cd;     for (int &y : ng[x])       if (y != p) {         dfs4lca(y, x, cd + 1);       }   }   void init4lca() {     for (int i = 1; i <= bcccnt; i++)       if (!vis[i]) dfs4lca(i, -1, 0);     for (int j = 0; j < 17; j++) {       for (int i = 1; i <= bcccnt; i++) {         if (fa[i][j] == -1)           fa[i][j + 1] = -1;         else           fa[i][j + 1] = fa[fa[i][j]][j];       }     }   }   int lca(int x, int y) {     if (dep[x] < dep[y]) swap(x, y);     for (int i = 17; i >= 0; i--) {       if (fa[x][i] != -1 && dep[fa[x][i]] >= dep[y]) x = fa[x][i];     }     if (x == y) return x;     for (int i = 17; i >= 0; i--) {       if (fa[x][i] != fa[y][i]) {         x = fa[x][i];         y = fa[y][i];       }     }     return fa[x][0];   }   int up[200005], down[200005];   void calc(int x, int p) {     vis[x] = 1;     for (int &y : ng[x])       if (y != p) {         calc(y, x);         up[x] += up[y];         down[x] += down[y];       }     if (up[x] && down[x]) {       puts( No );       exit(0);     }   }   int main() {     scanf( %d%d%d , &n, &m, &q);     for (int i = 1; i <= m; i++) {       int a, b;       scanf( %d%d , &a, &b);       g[a].emplace_back(b, i);       g[b].emplace_back(a, i);     }     for (int i = 1; i <= n; i++)       if (!dfn[i]) getbcc(i, -1);     for (int x = 1; x <= n; x++) {       for (pair<int, int> &e : g[x]) {         if (ibcc[x] != ibcc[e.first]) {           ng[ibcc[x]].emplace_back(ibcc[e.first]);         }       }     }     init4lca();     memset(vis, 0, sizeof(vis));     while (q--) {       int u, v, anc;       scanf( %d%d , &u, &v);       u = ibcc[u];       v = ibcc[v];       if (u == v) continue;       anc = lca(u, v);       up[u]++;       up[anc]--;       down[v]++;       down[anc]--;     }     for (int i = 1; i <= bcccnt; i++)       if (!vis[i]) calc(i, -1);     puts( Yes );     return 0;   }   