#include <bits/stdc++.h>
using namespace std;

typedef pair<int, int> pii;
const int N = 2e5 + 10, LOG = 20;

int n, m, q, u, v, parent, h[N], ups[N], dps[N], par[N], comp[N], mini[N], upper[N][LOG];
bool cant, mark[N], cross[N];
vector<int> tree_nei[N];
vector<pii> nei[N];
map<pii, int> cnt;
map<pii, bool> done;

void dfs(int v, int parent) {
	mark[v] = true;
	comp[v] = parent;
	for (pii p: nei[v])
		if(!mark[p.first])
			dfs(p.first, parent);
}

void find_cross(int v, int mypar) {
	mark[v] = true;
	mini[v] = h[v];
	for (pii p: nei[v]) {
		if(!mark[p.first]) {
			h[p.first] = h[v] + 1;
			find_cross(p.first, v);
		}
		if(p.first != mypar)
			mini[v] = min(mini[v], mini[p.first]);
		if(mini[p.first] > h[v]
		   && cnt[pii(min(v, p.first), max(v, p.first))] == 1)
			cross[p.second] = true;
	}
}

void tree_dfs(int v, int parent) {
	par[v] = parent;
	mark[v] = true;
	for (pii p: nei[v])
		if(cross[p.second])
			tree_nei[parent].push_back(p.first);
		else if(!mark[p.first])
			tree_dfs(p.first, parent);
}

int g_par(int v) {
	return (par[v] == v? v: (par[v] = g_par(par[v])));
}

void find_lca(int v) {
	mark[v] = true;
	for (int i = 1; i < LOG; i++)
		upper[v][i] = upper[upper[v][i - 1]][i - 1];
	for (int u: tree_nei[v]) {
		u = g_par(u);
		if(!mark[u]) {
			h[u] = h[v] + 1;
			upper[u][0] = v;
			find_lca(u);
		}
	}
}

inline int lca(int u, int v) {//in the same component
	if(h[u] < h[v])
		swap(u, v);
	for (int i = LOG - 1; i >= 0; i--)
		if(h[u] - (1LL << i) >= h[v])
			u = upper[u][i];
	if(u == v)
		return u;
	for (int i = LOG - 1; i >= 0; i--)
		if(upper[u][i] != upper[v][i]) {
			u = upper[u][i];
			v = upper[v][i];
		}
	return upper[u][0];
}

void check(int v) {
	mark[v] = true;
	for (int u: tree_nei[v]) {
		u = g_par(u);
		if(!mark[u]) {
			check(u);
			ups[v] += ups[u];
			dps[v] += dps[u];
		}
	}
	if(ups[v] && dps[v])
		cant = true;
}

int main() {
	ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
	cin >> n >> m >> q;
	for (int i = 0; i < m; i++) {
		cin >> u >> v;
		nei[--u].push_back(pii(--v, i));
		nei[v].push_back(pii(u, i));
		cnt[pii(min(u, v), max(u, v))]++;
	}
	for (int i = 0; i < n; i++)
		if(!mark[i])
			dfs(i, parent++);
	memset(mark, false, sizeof mark);
	for (int i = 0; i < n; i++)
		if(!mark[i])
			find_cross(i, i);
	memset(mark, false, sizeof mark);
	parent = 0;
	for (int i = 0; i < n; i++)
		if(!mark[i])
			tree_dfs(i, parent++);
	memset(mark, false, sizeof mark);
	memset(h, 0, sizeof h);
	for (int i = 0; i < parent; i++)
		if(!mark[i]) {
			upper[i][0] = i;
			find_lca(i);
		}
	while(q--) {
		cin >> u >> v;
		if(comp[--u] != comp[--v] || done[pii(v, u)])
			cant = true;
		else {
			u = g_par(u);
			v = g_par(v);
			if(done[pii(u, v)])
				continue;
			int LCA = lca(u, v);
			ups[u]++;
			dps[v]++;
			ups[LCA]--;
			dps[LCA]--;
			done[pii(u, v)] = true;
		}
	}
	memset(mark, false, sizeof mark);
	for (int i = 0; i < parent; i++)
		if(!mark[i])
			check(i);
	cout << (cant? "NO": "YES");
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef pair<int, int> pii;
const int N = 1e5 + 10, LOG = 17;

int n, m, q, u, v, parent, h[N], ups[N], dps[N], par[N], comp[N], mini[N], upper[N][LOG];
bool mark[N], cross[N];
vector<int> tree_nei[N];
vector<pii> same, nei[N];
map<pii, int> cnt;
map<pii, bool> done;

void dfs(int v) {
	mark[v] = true;
	comp[v] = parent;
	for (pii p: nei[v])
		if(!mark[p.first])
			dfs(p.first);
}

int find_cross(int v, int mypar) {
	mark[v] = true;
	mini[v] = h[v];
	for (pii p: nei[v]) {
		if(!mark[p.first]) {
			h[p.first] = h[v] + 1;
			find_cross(p.first, v);
		}
		if(p.first != mypar)
			mini[v] = min(mini[v], mini[p.first]);
		if(mini[p.first] > h[v])
			cross[p.second] = true;
	}
	return mini[v];
}

void tree_dfs(int v) {
	par[v] = parent;
	mark[v] = true;
	for (pii p: nei[v])
		if(!mark[p.first]) {
			if(cross[p.second])
				tree_nei[parent].push_back(p.first);
			else
				tree_dfs(p.first);
		}
		else if(cross[p.second])
			tree_nei[parent].push_back(p.first);
}

int g_par(int v) {
	if(par[v] != v)
		par[v] = g_par(par[v]);
	return par[v];
}

void find_lca(int v) {
	mark[v] = true;
	for (int i = 1; i < LOG; i++)
		upper[v][i] = upper[upper[v][i - 1]][i - 1];
	for (int u: tree_nei[v]) {
		u = g_par(u);
		if(!mark[u]) {
			h[u] = h[v] + 1;
			upper[u][0] = v;
			find_lca(u);
		}
	}
}

int lca(int u, int v) {//in the same component
	if(h[u] < h[v])
		swap(u, v);
	for (int i = LOG - 1; i >= 0; i--)
		if(h[u] - (1LL << i) >= h[v])
			u = upper[u][i];
	if(u == v)
		return u;
	for (int i = LOG - 1; i >= 0; i--)
		if(upper[u][i] != upper[v][i]) {
			u = upper[u][i];
			v = upper[v][i];
		}
	return upper[u][0];
}

void check(int v) {
	mark[v] = true;
	for (int u: tree_nei[v]) {
		u = g_par(u);
		if(!mark[u]) {
			check(u);
			ups[v] += ups[u];
			dps[v] += dps[u];
		}
	}
}

int main() {
	ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
	cin >> n >> m >> q;
	for (int i = 0; i < m; i++) {
		cin >> u >> v;
		nei[--u].push_back(pii(--v, i));
		nei[v].push_back(pii(u, i));
		if(cnt[pii(min(u, v), max(u, v))] < 3)
			cnt[pii(min(u, v), max(u, v))]++;
		if(cnt[pii(min(u, v), max(u, v))] == 2)
			same.push_back(pii(u, v));
	}
	for (int i = 0; i < n; i++)
		if(!mark[i]) {
			dfs(i);
			parent++;
		}
	memset(mark, false, sizeof mark);
	for (int i = 0; i < n; i++)
		if(!mark[i])
			find_cross(i, i);
	memset(mark, false, sizeof mark);
	parent = 0;
	for (int i = 0; i < n; i++)
		if(!mark[i]) {
			tree_dfs(i);
			parent++;
		}
	for (pii p: same)
		par[p.first] = g_par(p.second);
	memset(mark, false, sizeof mark);
	memset(h, 0, sizeof h);
	for (int i = 0; i < parent; i++)
		if(!mark[i]) {
			upper[i][0] = i;
			find_lca(i);
		}
	while(q--) {
		cin >> u >> v;
		if(comp[--u] != comp[--v]) {
			cout << "NO";
			return 0;
		}
		u = g_par(u);
		v = g_par(v);
		if(done[pii(u, v)])
			continue;
		ups[u]++;
		dps[v]++;
		int LCA = lca(u, v);
		ups[LCA]--;
		dps[LCA]--;
		done[pii(u, v)] = true;
	}
	memset(mark, false, sizeof mark);
	for (int i = 0; i < parent; i++)
		if(!mark[i])
			check(i);
	for (int i = 0; i < parent; i++)
		if(ups[i] > 0 && dps[i] > 0) {
			cout << "NO";
			return 0;
		}
	cout << "YES";
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef pair<int, int> pii;
const int N = 2e5 + 10, LOG = 20;

int n, m, q, u, v, parent, h[N], ups[N], dps[N], par[N], comp[N], mini[N], upper[N][LOG];
bool cant, mark[N], cross[N];
vector<int> tree_nei[N];
vector<pii> nei[N];
map<pii, int> cnt;
map<pii, bool> done;

void dfs(int v) {
	mark[v] = true;
	comp[v] = parent;
	for (pii p: nei[v])
		if(!mark[p.first])
			dfs(p.first);
}

void find_cross(int v, int mypar) {
	mark[v] = true;
	mini[v] = h[v];
	for (pii p: nei[v]) {
		if(!mark[p.first]) {
			h[p.first] = h[v] + 1;
			find_cross(p.first, v);
		}
		if(p.first != mypar)
			mini[v] = min(mini[v], mini[p.first]);
		if(mini[p.first] > h[v]
		   && cnt[pii(min(v, p.first), max(v, p.first))] == 1)
			cross[p.second] = true;
	}
}

void tree_dfs(int v) {
	par[v] = parent;
	mark[v] = true;
	for (pii p: nei[v])
		if(cross[p.second])
			tree_nei[parent].push_back(p.first);
		else if(!mark[p.first])
			tree_dfs(p.first);
}

void find_lca(int v) {
	mark[v] = true;
	for (int i = 1; i < LOG; i++)
		upper[v][i] = upper[upper[v][i - 1]][i - 1];
	for (int u: tree_nei[v]) {
		u = par[u];
		if(!mark[u]) {
			h[u] = h[v] + 1;
			upper[u][0] = v;
			find_lca(u);
		}
	}
}

inline int lca(int u, int v) {//in the same component
	if(h[u] < h[v])
		swap(u, v);
	for (int i = LOG - 1; i >= 0; i--)
		if(h[u] - (1LL << i) >= h[v])
			u = upper[u][i];
	if(u == v)
		return u;
	for (int i = LOG - 1; i >= 0; i--)
		if(upper[u][i] != upper[v][i]) {
			u = upper[u][i];
			v = upper[v][i];
		}
	return upper[u][0];
}

void check(int v) {
	mark[v] = true;
	for (int u: tree_nei[v]) {
		u = par[u];
		if(!mark[u]) {
			check(u);
			ups[v] += ups[u];
			dps[v] += dps[u];
		}
	}
	if(ups[v] > 0 && dps[v] > 0)
		cant = true;
}

int main() {
	ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
	cin >> n >> m >> q;
	for (int i = 0; i < m; i++) {
		cin >> u >> v;
		nei[--u].push_back(pii(--v, i));
		nei[v].push_back(pii(u, i));
		cnt[pii(min(u, v), max(u, v))]++;
	}
	for (int i = 0; i < n; i++)
		if(!mark[i]) {
			dfs(i);
			parent++;
		}
	memset(mark, false, sizeof mark);
	for (int i = 0; i < n; i++)
		if(!mark[i])
			find_cross(i, i);
	memset(mark, false, sizeof mark);
	parent = 0;
	for (int i = 0; i < n; i++)
		if(!mark[i]) {
			tree_dfs(i);
			parent++;
		}
	memset(mark, false, sizeof mark);
	memset(h, 0, sizeof h);
	for (int i = 0; i < parent; i++)
		if(!mark[i]) {
			upper[i][0] = i;
			find_lca(i);
		}
	while(q--) {
		cin >> u >> v;
		if(comp[--u] != comp[--v])
			cant = true;
		else {
			u = par[u];
			v = par[v];
			if(done[pii(u, v)])
				continue;
			int LCA = lca(u, v);
			ups[u]++;
			dps[v]++;
			ups[LCA]--;
			dps[LCA]--;
			done[pii(u, v)] = true;
		}
	}
	memset(mark, false, sizeof mark);
	for (int i = 0; i < parent; i++)
		if(!mark[i])
			check(i);
	cout << (cant? "NO": "YES");
	return 0;
}


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mkp make_pair
#define rint register int
#define INF ((1 << 30) - 1)
#define FI(n) FastIO::read(n)
#define FO(n) FastIO::write(n)
#define Pair pair < int, int >
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(rint i = (k); i >= (j); i--)
#define For(i, k, j) for(rint i = (k); i <= (j); i++)
#define Foe(i, u) for(rint i = lst[u], v = e[i].v; i; i = e[i].nxt, v = e[i].v)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define file(s) freopen(s".in", "r", stdin); freopen(s".out", "w", stdout)
//#define int long long
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void mulmod(int &a, int b) {a = 1ll * a * b % P;}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
namespace FastIO {
    const int SIZE=1<<16; char buf[SIZE], obuf[SIZE], str[64]; int bi=SIZE, bn=SIZE, opt;
    int read(char *s) {
        while (bn) {for (;bi<bn&&buf[bi]<=' ';bi++);if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}
        int sn=0;while (bn) {for (;bi<bn&&buf[bi]>' ';bi++) s[sn++]=buf[bi];if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}s[sn]=0;return sn;
    }
    bool read(int& x) {if(x)x=0;int bf=0,n=read(str); if(!n)return 0; int i=0; if (str[i]=='-') bf=1,i=1; for(x=0;i<n;i++) x=x*10+str[i]-'0'; if(bf) x=-x; return 1;}
    void write(int x) {
        if(!x) obuf[opt++] = '0'; else {if(x<0) obuf[opt++]='-',x=-x;int sn=0; while(x)str[sn++]=x%10+'0',x/=10;for (int i=sn-1;i>=0;i--) obuf[opt++]=str[i];}
        if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}
    }
    void write(char x) {obuf[opt++]=x;if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}}
    void Fflush() { if (opt) fwrite(obuf, 1, opt, stdout); opt=0;}
};
const int MAXN = 2e5 + 5;
int q, s[MAXN], t[MAXN];
struct Tree {
	int n, s1[MAXN], s2[MAXN], f[MAXN][20], ok = 1, dep[MAXN];
	vector < int > e[MAXN];
	void addedge(int u, int v) {e[u].pb(v);}
	void dfs(int u, int fa) {
		dep[u] = dep[fa] + 1;
		f[u][0] = fa; For(i, 1, 19) f[u][i] = f[f[fa][i-1]][i-1];
		for(auto v : e[u]) if(v != fa) dfs(v, u);
	}
	int lca(int u, int v) {
		if(dep[u] > dep[v]) swap(u, v);
		foR(i, 19, 0) if(dep[f[u][i]] < dep[v]) u = f[u][i];
		foR(i, 19, 0) {
			if(f[u][i] != f[v][i]) u = f[u][i], v = f[v][i];
		}
		return f[u][0];
	}
	void check(int u, int fa) {
		for(auto v : e[u]) {
			if(v == fa) continue;
			check(v, u);
			s1[u] += s1[v], s2[u] += s2[v];
		}
		if(s1[u] && s2[u]) ok = 0;
//		assert(s1[u] >= 0);assert(s2[u] >= 0);
	}
	bool solve() {
//		For(i, 1, q) cerr << s[i] << endl;
		For(i, 1, n) if(!f[i][0]) dfs(i, i);
//		For(i, 1, n) cerr << f[i][i] << endl;
		For(i, 1, q) {
//			cerr << i << ' ' << s[i] << ' ' << t[i]<< '*' <<endl;
			if(f[s[i]][19] != f[t[i]][19]) return 0;
		}
//		cerr << endl;
		For(i, 1, q) {
			int u = s[i], v = t[i], l = lca(u, v);
			s1[u]++, s1[l]--; s2[v]++, s2[l]--;
		}
		For(i, 1, n) {
			if(f[i][0] == i) assert(dep[i] == 1), check(i, i);
		}
		return ok;
	}

}T;
struct Graph {
	int n, m, bel[MAXN];
	map < Pair, int > cnt;
	vector < int > e[MAXN];
	int dfn[MAXN], low[MAXN], ind = 0, S[MAXN], top = 0, vis[MAXN<<1];
	void tarjan(int u, int fa) {
		dfn[u] = low[u] = ++ind; S[++top] = u;
		for(auto v : e[u]) {
			if(v == fa && cnt[mkp(u, v)] == 1) continue;
			if(dfn[v]) {
				low[u] = min(low[u], dfn[v]);
			} else {
				tarjan(v, u);
				low[u] = min(low[u], low[v]);
			}
		}
		if(low[u] == dfn[u]) {
//			cerr << u << endl;
			++T.n;
			while(S[top] != u)
				bel[S[top--]] = T.n;
			bel[S[top--]] = T.n;
		}
	}
	void init() {
		FI(n); FI(m); FI(q);
		while(m--) {
			int u, v; FI(u); FI(v);
			e[u].pb(v); e[v].pb(u); cnt[mkp(u, v)]++, cnt[mkp(v, u)]++;
		}
		For(i, 1, n) if(!dfn[i]) tarjan(i, 0);
//		For(i, 1, n) cerr << bel[i] << endl;
		For(u, 1, n) {
			for(auto v : e[u])
				if(bel[u] != bel[v]) T.addedge(bel[u], bel[v]);
		}
		For(i, 1, q) {
			FI(s[i]); FI(t[i]);
			s[i] = bel[s[i]], t[i] = bel[t[i]];
//			cerr << i << ' ' << s[i] << ' ' << t[i] << '*' << endl;
			if(s[i] == t[i]) i--, q--;
		}
//		For(i, 1, q) cerr << s[i] <<endl;
	}
}G;

signed main()
{
	#ifndef ONLINE_JUDGE
		file("pro");
	#endif
	G.init();
//	For(i, 1, q) cerr << s[i] << endl;
	printf(T.solve() ? "Yes\n" : "No\n");
    return FastIO::Fflush(), 0;
}
/*

*/


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mkp make_pair
#define rint register int
#define INF ((1 << 30) - 1)
#define FI(n) FastIO::read(n)
#define FO(n) FastIO::write(n)
#define Pair pair < int, int >
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(rint i = (k); i >= (j); i--)
#define For(i, k, j) for(rint i = (k); i <= (j); i++)
#define Foe(i, u) for(rint i = lst[u], v = e[i].v; i; i = e[i].nxt, v = e[i].v)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define file(s) freopen(s".in", "r", stdin); freopen(s".out", "w", stdout)
//#define int long long
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void mulmod(int &a, int b) {a = 1ll * a * b % P;}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
namespace FastIO {
    const int SIZE=1<<16; char buf[SIZE], obuf[SIZE], str[64]; int bi=SIZE, bn=SIZE, opt;
    int read(char *s) {
        while (bn) {for (;bi<bn&&buf[bi]<=' ';bi++);if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}
        int sn=0;while (bn) {for (;bi<bn&&buf[bi]>' ';bi++) s[sn++]=buf[bi];if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}s[sn]=0;return sn;
    }
    bool read(int& x) {if(x)x=0;int bf=0,n=read(str); if(!n)return 0; int i=0; if (str[i]=='-') bf=1,i=1; for(x=0;i<n;i++) x=x*10+str[i]-'0'; if(bf) x=-x; return 1;}
    void write(int x) {
        if(!x) obuf[opt++] = '0'; else {if(x<0) obuf[opt++]='-',x=-x;int sn=0; while(x)str[sn++]=x%10+'0',x/=10;for (int i=sn-1;i>=0;i--) obuf[opt++]=str[i];}
        if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}
    }
    void write(char x) {obuf[opt++]=x;if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}}
    void Fflush() { if (opt) fwrite(obuf, 1, opt, stdout); opt=0;}
};
const int MAXN = 2e5 + 5;
int q, s[MAXN], t[MAXN];
struct Tree {
	int n, s1[MAXN], s2[MAXN], f[MAXN][20], ok = 1, dep[MAXN];
	vector < int > e[MAXN];
	void addedge(int u, int v) {e[u].pb(v);}
	void dfs(int u, int fa) {
		dep[u] = dep[fa] + 1;
		f[u][0] = fa; For(i, 1, 19) f[u][i] = f[f[fa][i-1]][i-1];
		for(auto v : e[u]) if(v != fa) dfs(v, u);
	}
	inline int lca(int u, int v) {
		if(dep[u] < dep[v]) swap(u, v);
		foR(i, 19, 0) if(dep[f[u][i]] >= dep[v]) u = f[u][i];
//		cerr << dep[u] << ' ' << dep[v]<< endl;
		if(u == v) return u;
		foR(i, 19, 0)
			if(f[u][i] != f[v][i]) u = f[u][i], v = f[v][i];
		return f[u][0];
	}
	void check(int u, int fa) {
		for(auto v : e[u]) {
			if(v == fa) continue;
			check(v, u);
			s1[u] += s1[v], s2[u] += s2[v];
		}
//		cerr << u << ' ' << s1[u] << ' ' << s2[u] << endl;
		if(dep[u] != 1 && s1[u] && s2[u]) ok = 0;
//		cerr << u << endl;
		assert(s1[u] >= 0); assert(s2[u] >= 0);
	}
	bool solve() {
		For(i, 1, n) if(!f[i][0]) dfs(i, i);
		For(i, 1, q) {
			if(f[s[i]][19] != f[t[i]][19]) return 0;
		}
		For(i, 1, q) {
			int u = s[i], v = t[i], l = lca(u, v);
//			cerr << u << ' ' << v << ' ' << l << endl;
			s1[u]++, s1[l]--; s2[v]++, s2[l]--;
		}
//		cerr << endl;
		For(i, 1, n) {
			if(dep[i] == 1) {
				assert(f[i][0] == i); check(i, i);
			}
		}
		return ok;
	}

}T;
struct Graph {
	int n, m, bel[MAXN];
	map < Pair, int > cnt;
	vector < int > e[MAXN];
	int dfn[MAXN], low[MAXN], ind = 0, S[MAXN], top = 0, vis[MAXN<<1];
	void tarjan(int u, int fa) {
		dfn[u] = low[u] = ++ind; S[++top] = u;
		for(auto v : e[u]) {
			if(v == fa && cnt[mkp(u, v)] == 1) continue;
			if(dfn[v]) {
				low[u] = min(low[u], dfn[v]);
			} else {
				tarjan(v, u);
				low[u] = min(low[u], low[v]);
			}
		}
		if(low[u] == dfn[u]) {
//			cerr << u << endl;
			++T.n;
			while(S[top] != u)
				bel[S[top--]] = T.n;
			bel[S[top--]] = T.n;
		}
	}
	void init() {
		FI(n); FI(m); FI(q);
		while(m--) {
			int u = 0, v = 0; FI(u); FI(v);
			e[u].pb(v); e[v].pb(u); cnt[mkp(u, v)]++, cnt[mkp(v, u)]++;
		}
		For(i, 1, n) if(!dfn[i]) tarjan(i, 0);
//		For(i, 1, n) cerr << bel[i] << endl;
//		cerr << endl;
		For(u, 1, n) {
			for(auto v : e[u])
				if(bel[u] != bel[v]) T.addedge(bel[u], bel[v]);
		}
		For(i, 1, q) {
			FI(s[i]); FI(t[i]);
			s[i] = bel[s[i]], t[i] = bel[t[i]];
//			cerr << i << ' ' << s[i] << ' ' << t[i] << '*' << endl;
			if(s[i] == t[i]) i--, q--;
		}
		cerr << q << endl;
//		For(i, 1, q) cerr << s[i] <<endl;
	}
}G;

signed main()
{
	#ifndef ONLINE_JUDGE
		file("pro");
	#endif
	G.init();
//	For(i, 1, q) cerr << s[i] << endl;
	printf(T.solve() ? "Yes\n" : "No\n");
    return FastIO::Fflush(), 0;
}
/*

*/


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mkp make_pair
#define rint register int
#define INF ((1 << 30) - 1)
#define FI(n) FastIO::read(n)
#define FO(n) FastIO::write(n)
#define Pair pair < int, int >
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(rint i = (k); i >= (j); i--)
#define For(i, k, j) for(rint i = (k); i <= (j); i++)
#define Foe(i, u) for(rint i = lst[u], v = e[i].v; i; i = e[i].nxt, v = e[i].v)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define file(s) freopen(s".in", "r", stdin); freopen(s".out", "w", stdout)
//#define int long long
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void mulmod(int &a, int b) {a = 1ll * a * b % P;}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
namespace FastIO {
    const int SIZE=1<<16; char buf[SIZE], obuf[SIZE], str[64]; int bi=SIZE, bn=SIZE, opt;
    int read(char *s) {
        while (bn) {for (;bi<bn&&buf[bi]<=' ';bi++);if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}
        int sn=0;while (bn) {for (;bi<bn&&buf[bi]>' ';bi++) s[sn++]=buf[bi];if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}s[sn]=0;return sn;
    }
    bool read(int& x) {if(x)x=0;int bf=0,n=read(str); if(!n)return 0; int i=0; if (str[i]=='-') bf=1,i=1; for(x=0;i<n;i++) x=x*10+str[i]-'0'; if(bf) x=-x; return 1;}
    void write(int x) {
        if(!x) obuf[opt++] = '0'; else {if(x<0) obuf[opt++]='-',x=-x;int sn=0; while(x)str[sn++]=x%10+'0',x/=10;for (int i=sn-1;i>=0;i--) obuf[opt++]=str[i];}
        if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}
    }
    void write(char x) {obuf[opt++]=x;if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}}
    void Fflush() { if (opt) fwrite(obuf, 1, opt, stdout); opt=0;}
};
const int MAXN = 2e5 + 5;
int q, s[MAXN], t[MAXN];
struct Tree {
	int n, s1[MAXN], s2[MAXN], f[MAXN][20], ok = 1, dep[MAXN];
	vector < int > e[MAXN];
	void addedge(int u, int v) {e[u].pb(v);}
	void dfs(int u, int fa) {
		dep[u] = dep[fa] + 1;
		f[u][0] = fa; For(i, 1, 19) f[u][i] = f[f[fa][i-1]][i-1];
		for(auto v : e[u]) if(v != fa) dfs(v, u);
	}
	inline int lca(int u, int v) {
		if(dep[u] < dep[v]) swap(u, v);
		foR(i, 19, 0) if(dep[f[u][i]] >= dep[v]) u = f[u][i];
//		cerr << dep[u] << ' ' << dep[v]<< endl;
		if(u == v) return u;
		foR(i, 19, 0)
			if(f[u][i] != f[v][i]) u = f[u][i], v = f[v][i];
		return f[u][0];
	}
	void check(int u, int fa) {
		for(auto v : e[u]) {
			if(v == fa) continue;
			check(v, u);
			s1[u] += s1[v], s2[u] += s2[v];
		}
//		cerr << u << ' ' << s1[u] << ' ' << s2[u] << endl;
		if(dep[u] != 1 && s1[u] && s2[u]) {
			ok = 0;
			if(q == 10000) {
				printf("%d %d %d\n", u, s1[u], s2[u]);
				exit(0);
			}
		}
//		cerr << u << endl;
//		assert(s1[u] >= 0);assert(s2[u] >= 0);
	}
	bool solve() {
		For(i, 1, n) if(!f[i][0]) dfs(i, i);
		For(i, 1, q) {
			if(f[s[i]][19] != f[t[i]][19]) {
				if(q == 10000) printf("%d\n", 1000000);
				return 0;
			}
		}
		For(i, 1, q) {
			int u = s[i], v = t[i], l = lca(u, v);
//			cerr << u << ' ' << v << ' ' << l << endl;
			s1[u]++, s1[l]--; s2[v]++, s2[l]--;
			if(q == 10000) {
				if(!(u == l || v == l)) {
					cout << u << ' ' << v << ' ' << l << endl;
				}
//				assert(u == l || v == l);
			}
		}
//		cerr << endl;
		For(i, 1, n) {
			if(dep[i] == 1) check(i, i);
		}
		return ok;
	}

}T;
struct Graph {
	int n, m, bel[MAXN];
	map < Pair, int > cnt;
	vector < int > e[MAXN];
	int dfn[MAXN], low[MAXN], ind = 0, S[MAXN], top = 0, vis[MAXN<<1];
	void tarjan(int u, int fa) {
		dfn[u] = low[u] = ++ind; S[++top] = u;
		for(auto v : e[u]) {
			if(v == fa && cnt[mkp(u, v)] == 1) continue;
			if(dfn[v]) {
				low[u] = min(low[u], dfn[v]);
			} else {
				tarjan(v, u);
				low[u] = min(low[u], low[v]);
			}
		}
		if(low[u] == dfn[u]) {
//			cerr << u << endl;
			++T.n;
			while(S[top] != u)
				bel[S[top--]] = T.n;
			bel[S[top--]] = T.n;
		}
	}
	void init() {
		FI(n); FI(m); FI(q);
		while(m--) {
			int u = 0, v = 0; FI(u); FI(v);
			if(q == 10000) {
				assert(v == u + 1);
			}
			e[u].pb(v); e[v].pb(u); cnt[mkp(u, v)]++, cnt[mkp(v, u)]++;
		}
		For(i, 1, n) if(!dfn[i]) tarjan(i, 0);
//		For(i, 1, n) cerr << bel[i] << endl;
//		cerr << endl;
		For(u, 1, n) {
			for(auto v : e[u])
				if(bel[u] != bel[v]) T.addedge(bel[u], bel[v]);
		}
		For(i, 1, q) {
			FI(s[i]); FI(t[i]);
			s[i] = bel[s[i]], t[i] = bel[t[i]];
//			cerr << i << ' ' << s[i] << ' ' << t[i] << '*' << endl;
			if(s[i] == t[i]) i--, q--;
		}
//		For(i, 1, q) cerr << s[i] <<endl;
	}
}G;

signed main()
{
//	#ifndef ONLINE_JUDGE
//		file("pro");
//	#endif
	G.init();
//	For(i, 1, q) cerr << s[i] << endl;
	printf(T.solve() ? "Yes\n" : "No\n");
    return FastIO::Fflush(), 0;
}
/*

*/


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mkp make_pair
#define rint register int
#define INF ((1 << 30) - 1)
#define FI(n) FastIO::read(n)
#define FO(n) FastIO::write(n)
#define Pair pair < int, int >
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(rint i = (k); i >= (j); i--)
#define For(i, k, j) for(rint i = (k); i <= (j); i++)
#define Foe(i, u) for(rint i = lst[u], v = e[i].v; i; i = e[i].nxt, v = e[i].v)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define file(s) freopen(s".in", "r", stdin); freopen(s".out", "w", stdout)
//#define int long long
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void mulmod(int &a, int b) {a = 1ll * a * b % P;}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
namespace FastIO {
    const int SIZE=1<<16; char buf[SIZE], obuf[SIZE], str[64]; int bi=SIZE, bn=SIZE, opt;
    int read(char *s) {
        while (bn) {for (;bi<bn&&buf[bi]<=' ';bi++);if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}
        int sn=0;while (bn) {for (;bi<bn&&buf[bi]>' ';bi++) s[sn++]=buf[bi];if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}s[sn]=0;return sn;
    }
    bool read(int& x) {if(x)x=0;int bf=0,n=read(str); if(!n)return 0; int i=0; if (str[i]=='-') bf=1,i=1; for(x=0;i<n;i++) x=x*10+str[i]-'0'; if(bf) x=-x; return 1;}
    void write(int x) {
        if(!x) obuf[opt++] = '0'; else {if(x<0) obuf[opt++]='-',x=-x;int sn=0; while(x)str[sn++]=x%10+'0',x/=10;for (int i=sn-1;i>=0;i--) obuf[opt++]=str[i];}
        if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}
    }
    void write(char x) {obuf[opt++]=x;if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}}
    void Fflush() { if (opt) fwrite(obuf, 1, opt, stdout); opt=0;}
};
const int MAXN = 2e5 + 5;
int q, s[MAXN], t[MAXN];
struct Tree {
	int n, s1[MAXN], s2[MAXN], f[MAXN][20], ok = 1, dep[MAXN];
	vector < int > e[MAXN];
	void addedge(int u, int v) {e[u].pb(v);}
	void dfs(int u, int fa) {
		dep[u] = dep[fa] + 1;
		f[u][0] = fa; For(i, 1, 19) f[u][i] = f[f[fa][i-1]][i-1];
		for(auto v : e[u]) if(v != fa) dfs(v, u);
	}
	inline int lca(int u, int v) {
		if(dep[u] < dep[v]) swap(u, v);
		foR(i, 19, 0) if(dep[f[u][i]] >= dep[v]) u = f[u][i];
//		cerr << dep[u] << ' ' << dep[v]<< endl;
		if(u == v) return u;
		foR(i, 19, 0)
			if(f[u][i] != f[v][i]) u = f[u][i], v = f[v][i];
		return f[u][0];
	}
	void check(int u, int fa) {
		for(auto v : e[u]) {
			if(v == fa) continue;
			check(v, u);
			s1[u] += s1[v], s2[u] += s2[v];
		}
//		cerr << u << ' ' << s1[u] << ' ' << s2[u] << endl;
		if(dep[u] != 1 && s1[u] && s2[u]) {
			ok = 0;
			if(q == 10000) {
				printf("%d %d %d\n", u, s1[u], s2[u]);
				exit(0);
			}
		}
//		cerr << u << endl;
//		assert(s1[u] >= 0);assert(s2[u] >= 0);
	}
	bool solve() {
		For(i, 1, n) if(!f[i][0]) dfs(i, i);
		For(i, 1, q) {
			if(f[s[i]][19] != f[t[i]][19]) {
				if(q == 10000) printf("%d\n", 1000000);
				return 0;
			}
		}
		For(i, 1, q) {
			int u = s[i], v = t[i], l = lca(u, v);
//			cerr << u << ' ' << v << ' ' << l << endl;
			s1[u]++, s1[l]--; s2[v]++, s2[l]--;
			if(q == 10000) {
				if(!(u == l || v == l)) {
					cout << u << ' ' << v << ' ' << l << endl;
				}
//				assert(u == l || v == l);
			}
		}
//		cerr << endl;
		For(i, 1, n) {
			if(dep[i] == 1) check(i, i);
		}
		return ok;
	}

}T;
struct Graph {
	int n, m, bel[MAXN];
	map < Pair, int > cnt;
	vector < int > e[MAXN];
	int dfn[MAXN], low[MAXN], ind = 0, S[MAXN], top = 0, vis[MAXN<<1];
	void tarjan(int u, int fa) {
		dfn[u] = low[u] = ++ind; S[++top] = u;
		for(auto v : e[u]) {
			if(v == fa && cnt[mkp(u, v)] == 1) continue;
			if(dfn[v]) {
				low[u] = min(low[u], dfn[v]);
			} else {
				tarjan(v, u);
				low[u] = min(low[u], low[v]);
			}
		}
		if(low[u] == dfn[u]) {
//			cerr << u << endl;
			++T.n;
			while(S[top] != u)
				bel[S[top--]] = T.n;
			bel[S[top--]] = T.n;
		}
	}
	void init() {
		FI(n); FI(m); FI(q);
		while(m--) {
			int u = 0, v = 0; FI(u); FI(v);
			e[u].pb(v); e[v].pb(u); cnt[mkp(u, v)]++, cnt[mkp(v, u)]++;
		}
		For(i, 1, n) if(!dfn[i]) tarjan(i, 0);
//		For(i, 1, n) cerr << bel[i] << endl;
//		cerr << endl;
		For(u, 1, n) {
			for(auto v : e[u])
				if(bel[u] != bel[v]) T.addedge(bel[u], bel[v]);
		}
		For(i, 1, q) {
			FI(s[i]); FI(t[i]);
			s[i] = bel[s[i]], t[i] = bel[t[i]];
//			cerr << i << ' ' << s[i] << ' ' << t[i] << '*' << endl;
			if(s[i] == t[i]) i--, q--;
		}
//		For(i, 1, q) cerr << s[i] <<endl;
	}
}G;

signed main()
{
//	#ifndef ONLINE_JUDGE
//		file("pro");
//	#endif
	G.init();
//	For(i, 1, q) cerr << s[i] << endl;
	printf(T.solve() ? "Yes\n" : "No\n");
    return FastIO::Fflush(), 0;
}
/*

*/


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mkp make_pair
#define rint register int
#define INF ((1 << 30) - 1)
#define FI(n) FastIO::read(n)
#define FO(n) FastIO::write(n)
#define Pair pair < int, int >
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(rint i = (k); i >= (j); i--)
#define For(i, k, j) for(rint i = (k); i <= (j); i++)
#define Foe(i, u) for(rint i = lst[u], v = e[i].v; i; i = e[i].nxt, v = e[i].v)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define file(s) freopen(s".in", "r", stdin); freopen(s".out", "w", stdout)
//#define int long long
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void mulmod(int &a, int b) {a = 1ll * a * b % P;}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
namespace FastIO {
    const int SIZE=1<<16; char buf[SIZE], obuf[SIZE], str[64]; int bi=SIZE, bn=SIZE, opt;
    int read(char *s) {
        while (bn) {for (;bi<bn&&buf[bi]<=' ';bi++);if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}
        int sn=0;while (bn) {for (;bi<bn&&buf[bi]>' ';bi++) s[sn++]=buf[bi];if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}s[sn]=0;return sn;
    }
    bool read(int& x) {if(x)x=0;int bf=0,n=read(str); if(!n)return 0; int i=0; if (str[i]=='-') bf=1,i=1; for(x=0;i<n;i++) x=x*10+str[i]-'0'; if(bf) x=-x; return 1;}
    void write(int x) {
        if(!x) obuf[opt++] = '0'; else {if(x<0) obuf[opt++]='-',x=-x;int sn=0; while(x)str[sn++]=x%10+'0',x/=10;for (int i=sn-1;i>=0;i--) obuf[opt++]=str[i];}
        if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}
    }
    void write(char x) {obuf[opt++]=x;if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}}
    void Fflush() { if (opt) fwrite(obuf, 1, opt, stdout); opt=0;}
};
const int MAXN = 2e5 + 5;
int q, s[MAXN], t[MAXN];
struct Tree {
	int n, s1[MAXN], s2[MAXN], f[MAXN][20], ok = 1, dep[MAXN];
	vector < int > e[MAXN];
	void addedge(int u, int v) {e[u].pb(v);}
	void dfs(int u, int fa) {
		dep[u] = dep[fa] + 1;
		f[u][0] = fa; For(i, 1, 19) f[u][i] = f[f[fa][i-1]][i-1];
		for(auto v : e[u]) if(v != fa) dfs(v, u);
	}
	inline int lca(int u, int v) {
		if(dep[u] < dep[v]) swap(u, v);
		foR(i, 19, 0) if(dep[f[u][i]] >= dep[v]) u = f[u][i];
//		cerr << dep[u] << ' ' << dep[v]<< endl;
		if(u == v) return u;
		foR(i, 19, 0)
			if(f[u][i] != f[v][i]) u = f[u][i], v = f[v][i];
		return f[u][0];
	}
	void check(int u, int fa) {
		for(auto v : e[u]) {
			if(v == fa) continue;
			check(v, u);
			s1[u] += s1[v], s2[u] += s2[v];
		}
//		cerr << u << ' ' << s1[u] << ' ' << s2[u] << endl;
		if(dep[u] != 1 && s1[u] && s2[u]) ok = 0;
//		cerr << u << endl;
		assert(s1[u] >= 0); assert(s2[u] >= 0);
	}
	bool solve() {
		For(i, 1, n) if(!f[i][0]) dfs(i, i);
		For(i, 1, q) {
			if(f[s[i]][19] != f[t[i]][19]) return 0;
		}
		For(i, 1, q) {
			int u = s[i], v = t[i], l = lca(u, v);
//			cerr << u << ' ' << v << ' ' << l << endl;
			s1[u]++, s1[l]--; s2[v]++, s2[l]--;
		}
//		cerr << endl;
		For(i, 1, n) {
			if(dep[i] == 1) {
				assert(f[i][0] == i); check(i, i);
			}
		}
		return ok;
	}

}T;
struct Graph {
	int n, m, bel[MAXN];
	map < Pair, int > cnt;
	vector < int > e[MAXN];
	int dfn[MAXN], low[MAXN], ind = 0, S[MAXN], top = 0, vis[MAXN<<1];
	void tarjan(int u, int fa) {
		dfn[u] = low[u] = ++ind; S[++top] = u;
		for(auto v : e[u]) {
			if(v == fa && cnt[mkp(u, v)] == 1) continue;
			if(dfn[v]) {
				low[u] = min(low[u], dfn[v]);
			} else {
				tarjan(v, u);
				low[u] = min(low[u], low[v]);
			}
		}
		if(low[u] == dfn[u]) {
//			cerr << u << endl;
			++T.n;
			while(S[top] != u)
				bel[S[top--]] = T.n;
			bel[S[top--]] = T.n;
		}
	}
	void init() {
		FI(n); FI(m); FI(q);
		while(m--) {
			int u = 0, v = 0; FI(u); FI(v);
			e[u].pb(v); e[v].pb(u); cnt[mkp(u, v)]++, cnt[mkp(v, u)]++;
		}
		For(i, 1, n) if(!dfn[i]) tarjan(i, 0);
//		For(i, 1, n) cerr << bel[i] << endl;
//		cerr << endl;
		For(u, 1, n) {
			for(auto v : e[u])
				if(bel[u] != bel[v]) T.addedge(bel[u], bel[v]);
		}
		For(i, 1, q) {
			FI(s[i]); FI(t[i]);
			s[i] = bel[s[i]], t[i] = bel[t[i]];
//			cerr << i << ' ' << s[i] << ' ' << t[i] << '*' << endl;
			if(s[i] == t[i]) i--, q--;
		}
		cout << q << endl;
//		For(i, 1, q) cerr << s[i] <<endl;
	}
}G;

signed main()
{
	#ifndef ONLINE_JUDGE
		file("pro");
	#endif
	G.init();
//	For(i, 1, q) cerr << s[i] << endl;
	printf(T.solve() ? "Yes\n" : "No\n");
    return FastIO::Fflush(), 0;
}
/*

*/


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mkp make_pair
#define rint register int
#define INF ((1 << 30) - 1)
#define FI(n) FastIO::read(n)
#define FO(n) FastIO::write(n)
#define Pair pair < int, int >
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(rint i = (k); i >= (j); i--)
#define For(i, k, j) for(rint i = (k); i <= (j); i++)
#define Foe(i, u) for(rint i = lst[u], v = e[i].v; i; i = e[i].nxt, v = e[i].v)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define file(s) freopen(s".in", "r", stdin); freopen(s".out", "w", stdout)
//#define int long long
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void mulmod(int &a, int b) {a = 1ll * a * b % P;}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
namespace FastIO {
    const int SIZE=1<<16; char buf[SIZE], obuf[SIZE], str[64]; int bi=SIZE, bn=SIZE, opt;
    int read(char *s) {
        while (bn) {for (;bi<bn&&buf[bi]<=' ';bi++);if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}
        int sn=0;while (bn) {for (;bi<bn&&buf[bi]>' ';bi++) s[sn++]=buf[bi];if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}s[sn]=0;return sn;
    }
    bool read(int& x) {if(x)x=0;int bf=0,n=read(str); if(!n)return 0; int i=0; if (str[i]=='-') bf=1,i=1; for(x=0;i<n;i++) x=x*10+str[i]-'0'; if(bf) x=-x; return 1;}
    void write(int x) {
        if(!x) obuf[opt++] = '0'; else {if(x<0) obuf[opt++]='-',x=-x;int sn=0; while(x)str[sn++]=x%10+'0',x/=10;for (int i=sn-1;i>=0;i--) obuf[opt++]=str[i];}
        if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}
    }
    void write(char x) {obuf[opt++]=x;if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}}
    void Fflush() { if (opt) fwrite(obuf, 1, opt, stdout); opt=0;}
};
const int MAXN = 2e5 + 5;
int q, s[MAXN], t[MAXN];
struct Tree {
	int n, s1[MAXN], s2[MAXN], f[MAXN][20], ok = 1, dep[MAXN];
	vector < int > e[MAXN];
	void addedge(int u, int v) {e[u].pb(v);}
	void dfs(int u, int fa) {
		dep[u] = dep[fa] + 1;
		f[u][0] = fa; For(i, 1, 19) f[u][i] = f[f[fa][i-1]][i-1];
		for(auto v : e[u]) if(v != fa) dfs(v, u);
	}
	int lca(int u, int v) {
		if(dep[u] < dep[v]) swap(u, v);
		foR(i, 19, 0) if(dep[f[u][i]] >= dep[v]) u = f[u][i];
		foR(i, 19, 0)
			if(f[u][i] != f[v][i]) u = f[u][i], v = f[v][i];
		return f[u][0];
	}
	void check(int u, int fa) {
		for(auto v : e[u]) {
			if(v == fa) continue;
			check(v, u);
			s1[u] += s1[v], s2[u] += s2[v];
		}
		if(dep[u] != 1 && s1[u] && s2[u]) ok = 0;
//		assert(s1[u] >= 0);assert(s2[u] >= 0);
	}
	bool solve() {
		For(i, 1, n) if(!f[i][0]) dfs(i, i);
		For(i, 1, q) {
			if(f[s[i]][19] != f[t[i]][19]) return 0;
		}
		For(i, 1, q) {
			int u = s[i], v = t[i], l = lca(u, v);
			s1[u]++, s1[l]--; s2[v]++, s2[l]--;
		}
		For(i, 1, n) {
			if(f[i][0] == i) check(i, i);
		}
		return ok;
	}

}T;
struct Graph {
	int n, m, bel[MAXN];
	map < Pair, int > cnt;
	vector < int > e[MAXN];
	int dfn[MAXN], low[MAXN], ind = 0, S[MAXN], top = 0, vis[MAXN<<1];
	void tarjan(int u, int fa) {
		dfn[u] = low[u] = ++ind; S[++top] = u;
		for(auto v : e[u]) {
			if(v == fa && cnt[mkp(u, v)] == 1) continue;
			if(dfn[v]) {
				low[u] = min(low[u], dfn[v]);
			} else {
				tarjan(v, u);
				low[u] = min(low[u], low[v]);
			}
		}
		if(low[u] == dfn[u]) {
//			cerr << u << endl;
			++T.n;
			while(S[top] != u)
				bel[S[top--]] = T.n;
			bel[S[top--]] = T.n;
		}
	}
	void init() {
		FI(n); FI(m); FI(q);
		while(m--) {
			int u = 0, v = 0; FI(u); FI(v);
			e[u].pb(v); e[v].pb(u); cnt[mkp(u, v)]++, cnt[mkp(v, u)]++;
		}
		For(i, 1, n) if(!dfn[i]) tarjan(i, 0);
//		For(i, 1, n) cerr << bel[i] << endl;
		For(u, 1, n) {
			for(auto v : e[u])
				if(bel[u] != bel[v]) T.addedge(bel[u], bel[v]);
		}
		For(i, 1, q) {
			FI(s[i]); FI(t[i]);
			s[i] = bel[s[i]], t[i] = bel[t[i]];
//			cerr << i << ' ' << s[i] << ' ' << t[i] << '*' << endl;
			if(s[i] == t[i]) i--, q--;
		}
//		For(i, 1, q) cerr << s[i] <<endl;
	}
}G;

signed main()
{
	#ifndef ONLINE_JUDGE
		file("pro");
	#endif
	G.init();
//	For(i, 1, q) cerr << s[i] << endl;
	printf(T.solve() ? "Yes\n" : "No\n");
    return FastIO::Fflush(), 0;
}
/*

*/


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mkp make_pair
#define rint register int
#define INF ((1 << 30) - 1)
#define FI(n) FastIO::read(n)
#define FO(n) FastIO::write(n)
#define Pair pair < int, int >
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(rint i = (k); i >= (j); i--)
#define For(i, k, j) for(rint i = (k); i <= (j); i++)
#define Foe(i, u) for(rint i = lst[u], v = e[i].v; i; i = e[i].nxt, v = e[i].v)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define file(s) freopen(s".in", "r", stdin); freopen(s".out", "w", stdout)
//#define int long long
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void mulmod(int &a, int b) {a = 1ll * a * b % P;}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
namespace FastIO {
    const int SIZE=1<<16; char buf[SIZE], obuf[SIZE], str[64]; int bi=SIZE, bn=SIZE, opt;
    int read(char *s) {
        while (bn) {for (;bi<bn&&buf[bi]<=' ';bi++);if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}
        int sn=0;while (bn) {for (;bi<bn&&buf[bi]>' ';bi++) s[sn++]=buf[bi];if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}s[sn]=0;return sn;
    }
    bool read(int& x) {if(x)x=0;int bf=0,n=read(str); if(!n)return 0; int i=0; if (str[i]=='-') bf=1,i=1; for(x=0;i<n;i++) x=x*10+str[i]-'0'; if(bf) x=-x; return 1;}
    void write(int x) {
        if(!x) obuf[opt++] = '0'; else {if(x<0) obuf[opt++]='-',x=-x;int sn=0; while(x)str[sn++]=x%10+'0',x/=10;for (int i=sn-1;i>=0;i--) obuf[opt++]=str[i];}
        if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}
    }
    void write(char x) {obuf[opt++]=x;if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}}
    void Fflush() { if (opt) fwrite(obuf, 1, opt, stdout); opt=0;}
};
const int MAXN = 2e5 + 5;
int q, s[MAXN], t[MAXN];
struct Tree {
	int n, s1[MAXN], s2[MAXN], f[MAXN][20], ok = 1, dep[MAXN];
	vector < int > e[MAXN];
	void addedge(int u, int v) {e[u].pb(v);}
	void dfs(int u, int fa) {
		dep[u] = dep[fa] + 1;
		f[u][0] = fa; For(i, 1, 19) f[u][i] = f[f[u][i-1]][i-1];
		for(auto v : e[u]) if(v != fa) dfs(v, u);
	}
	inline int lca(int u, int v) {
		if(dep[u] < dep[v]) swap(u, v);
		foR(i, 19, 0) if(dep[f[u][i]] >= dep[v]) u = f[u][i];
//		cerr << dep[u] << ' ' << dep[v]<< endl;
		if(u == v) return u;
		foR(i, 19, 0)
			if(f[u][i] != f[v][i]) u = f[u][i], v = f[v][i];
		return f[u][0];
	}
	void check(int u, int fa) {
		for(auto v : e[u]) {
			if(v == fa) continue;
			check(v, u);
			s1[u] += s1[v], s2[u] += s2[v];
		}
//		cerr << u << ' ' << s1[u] << ' ' << s2[u] << endl;
		if(dep[u] != 1 && s1[u] && s2[u]) ok = 0;
//		cerr << u << endl;
//		assert(s1[u] >= 0); assert(s2[u] >= 0);
	}
	bool solve() {
		For(i, 1, n) if(!f[i][0]) dfs(i, i);
		For(i, 1, q) {
			if(f[s[i]][19] != f[t[i]][19]) return 0;
		}
		For(i, 1, q) {
			int u = s[i], v = t[i], l = lca(u, v);
//			cerr << u << ' ' << v << ' ' << l << endl;
			s1[u]++, s1[l]--; s2[v]++, s2[l]--;
		}
//		cerr << endl;
		For(i, 1, n) {
			if(dep[i] == 1) {
				assert(f[i][0] == i); check(i, i);
			}
		}
		return ok;
	}

}T;
struct Graph {
	int n, m, bel[MAXN];
	map < Pair, int > cnt;
	vector < int > e[MAXN];
	int dfn[MAXN], low[MAXN], ind = 0, S[MAXN], top = 0, vis[MAXN<<1];
	void tarjan(int u, int fa) {
		dfn[u] = low[u] = ++ind; S[++top] = u;
		for(auto v : e[u]) {
			if(v == fa && cnt[mkp(u, v)] <= 1) continue;
			if(dfn[v]) {
				low[u] = min(low[u], dfn[v]);
			} else {
				tarjan(v, u);
				low[u] = min(low[u], low[v]);
			}
		}
		if(low[u] == dfn[u]) {
//			cerr << u << endl;
			++T.n;
			while(S[top] != u)
				bel[S[top--]] = T.n;
			bel[S[top--]] = T.n;
		}
	}
	void init() {
		FI(n); FI(m); FI(q);
		while(m--) {
			int u = 0, v = 0; FI(u); FI(v);
			e[u].pb(v); e[v].pb(u); cnt[mkp(u, v)]++, cnt[mkp(v, u)]++;
		}
		For(i, 1, n) if(!dfn[i]) tarjan(i, 0);
//		For(i, 1, n) cerr << bel[i] << endl;
//		cerr << endl;
		For(u, 1, n) {
			for(auto v : e[u])
				if(bel[u] != bel[v]) T.addedge(bel[u], bel[v]);
		}
		For(i, 1, q) {
			FI(s[i]); FI(t[i]);
			s[i] = bel[s[i]], t[i] = bel[t[i]];
//			cerr << i << ' ' << s[i] << ' ' << t[i] << '*' << endl;
			if(s[i] == t[i]) i--, q--;
		}
		cerr << q << endl;
//		For(i, 1, q) cerr << s[i] <<endl;
	}
}G;

signed main()
{
	#ifndef ONLINE_JUDGE
		file("pro");
	#endif
	G.init();
//	For(i, 1, q) cerr << s[i] << endl;
	printf(T.solve() ? "Yes\n" : "No\n");
    return FastIO::Fflush(), 0;
}
/*

*/


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mkp make_pair
#define rint register int
#define INF ((1 << 30) - 1)
#define FI(n) FastIO::read(n)
#define FO(n) FastIO::write(n)
#define Pair pair < int, int >
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(rint i = (k); i >= (j); i--)
#define For(i, k, j) for(rint i = (k); i <= (j); i++)
#define Foe(i, u) for(rint i = lst[u], v = e[i].v; i; i = e[i].nxt, v = e[i].v)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define file(s) freopen(s".in", "r", stdin); freopen(s".out", "w", stdout)
//#define int long long
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void mulmod(int &a, int b) {a = 1ll * a * b % P;}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
namespace FastIO {
    const int SIZE=1<<16; char buf[SIZE], obuf[SIZE], str[64]; int bi=SIZE, bn=SIZE, opt;
    int read(char *s) {
        while (bn) {for (;bi<bn&&buf[bi]<=' ';bi++);if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}
        int sn=0;while (bn) {for (;bi<bn&&buf[bi]>' ';bi++) s[sn++]=buf[bi];if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}s[sn]=0;return sn;
    }
    bool read(int& x) {if(x)x=0;int bf=0,n=read(str); if(!n)return 0; int i=0; if (str[i]=='-') bf=1,i=1; for(x=0;i<n;i++) x=x*10+str[i]-'0'; if(bf) x=-x; return 1;}
    void write(int x) {
        if(!x) obuf[opt++] = '0'; else {if(x<0) obuf[opt++]='-',x=-x;int sn=0; while(x)str[sn++]=x%10+'0',x/=10;for (int i=sn-1;i>=0;i--) obuf[opt++]=str[i];}
        if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}
    }
    void write(char x) {obuf[opt++]=x;if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}}
    void Fflush() { if (opt) fwrite(obuf, 1, opt, stdout); opt=0;}
};
const int MAXN = 2e5 + 5;
int q, s[MAXN], t[MAXN];
struct Tree {
	int n, s1[MAXN], s2[MAXN], f[MAXN][20], ok = 1, dep[MAXN];
	vector < int > e[MAXN];
	void addedge(int u, int v) {e[u].pb(v);}
	void dfs(int u, int fa) {
		dep[u] = dep[fa] + 1;
		f[u][0] = fa; For(i, 1, 19) f[u][i] = f[f[fa][i-1]][i-1];
		for(auto v : e[u]) if(v != fa) dfs(v, u);
	}
	inline int lca(int u, int v) {
		if(dep[u] < dep[v]) swap(u, v);
		foR(i, 19, 0) if(dep[f[u][i]] >= dep[v]) u = f[u][i];
//		cerr << dep[u] << ' ' << dep[v]<< endl;
		if(u == v) return u;
		foR(i, 19, 0)
			if(f[u][i] != f[v][i]) u = f[u][i], v = f[v][i];
		return f[u][0];
	}
	void check(int u, int fa) {
		for(auto v : e[u]) {
			if(v == fa) continue;
			check(v, u);
			s1[u] += s1[v], s2[u] += s2[v];
		}
//		cerr << u << ' ' << s1[u] << ' ' << s2[u] << endl;
		if(dep[u] != 1 && s1[u] && s2[u]) {
			ok = 0;
			if(q == 10000) {
				printf("%d\n", u);
				exit(0);
			}
		}
//		cerr << u << endl;
//		assert(s1[u] >= 0);assert(s2[u] >= 0);
	}
	bool solve() {
		For(i, 1, n) if(!f[i][0]) dfs(i, i);
		For(i, 1, q) {
			if(f[s[i]][19] != f[t[i]][19]) {
				if(q == 10000) printf("%d\n", 1000000);
				return 0;
			}
		}
		For(i, 1, q) {
			int u = s[i], v = t[i], l = lca(u, v);
//			cerr << u << ' ' << v << ' ' << l << endl;
			s1[u]++, s1[l]--; s2[v]++, s2[l]--;
		}
//		cerr << endl;
		For(i, 1, n) {
			if(dep[i] == 1) check(i, i);
		}
		return ok;
	}

}T;
struct Graph {
	int n, m, bel[MAXN];
	map < Pair, int > cnt;
	vector < int > e[MAXN];
	int dfn[MAXN], low[MAXN], ind = 0, S[MAXN], top = 0, vis[MAXN<<1];
	void tarjan(int u, int fa) {
		dfn[u] = low[u] = ++ind; S[++top] = u;
		for(auto v : e[u]) {
			if(v == fa && cnt[mkp(u, v)] == 1) continue;
			if(dfn[v]) {
				low[u] = min(low[u], dfn[v]);
			} else {
				tarjan(v, u);
				low[u] = min(low[u], low[v]);
			}
		}
		if(low[u] == dfn[u]) {
//			cerr << u << endl;
			++T.n;
			while(S[top] != u)
				bel[S[top--]] = T.n;
			bel[S[top--]] = T.n;
		}
	}
	void init() {
		FI(n); FI(m); FI(q);
		while(m--) {
			int u = 0, v = 0; FI(u); FI(v);
			e[u].pb(v); e[v].pb(u); cnt[mkp(u, v)]++, cnt[mkp(v, u)]++;
		}
		For(i, 1, n) if(!dfn[i]) tarjan(i, 0);
//		For(i, 1, n) cerr << bel[i] << endl;
//		cerr << endl;
		For(u, 1, n) {
			for(auto v : e[u])
				if(bel[u] != bel[v]) T.addedge(bel[u], bel[v]);
		}
		For(i, 1, q) {
			FI(s[i]); FI(t[i]);
			s[i] = bel[s[i]], t[i] = bel[t[i]];
//			cerr << i << ' ' << s[i] << ' ' << t[i] << '*' << endl;
			if(s[i] == t[i]) i--, q--;
		}
//		For(i, 1, q) cerr << s[i] <<endl;
	}
}G;

signed main()
{
//	#ifndef ONLINE_JUDGE
//		file("pro");
//	#endif
	G.init();
//	For(i, 1, q) cerr << s[i] << endl;
	printf(T.solve() ? "Yes\n" : "No\n");
    return FastIO::Fflush(), 0;
}
/*

*/


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mkp make_pair
#define rint register int
#define INF ((1 << 30) - 1)
#define FI(n) FastIO::read(n)
#define FO(n) FastIO::write(n)
#define Pair pair < int, int >
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(rint i = (k); i >= (j); i--)
#define For(i, k, j) for(rint i = (k); i <= (j); i++)
#define Foe(i, u) for(rint i = lst[u], v = e[i].v; i; i = e[i].nxt, v = e[i].v)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define file(s) freopen(s".in", "r", stdin); freopen(s".out", "w", stdout)
//#define int long long
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void mulmod(int &a, int b) {a = 1ll * a * b % P;}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
namespace FastIO {
    const int SIZE=1<<16; char buf[SIZE], obuf[SIZE], str[64]; int bi=SIZE, bn=SIZE, opt;
    int read(char *s) {
        while (bn) {for (;bi<bn&&buf[bi]<=' ';bi++);if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}
        int sn=0;while (bn) {for (;bi<bn&&buf[bi]>' ';bi++) s[sn++]=buf[bi];if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}s[sn]=0;return sn;
    }
    bool read(int& x) {if(x)x=0;int bf=0,n=read(str); if(!n)return 0; int i=0; if (str[i]=='-') bf=1,i=1; for(x=0;i<n;i++) x=x*10+str[i]-'0'; if(bf) x=-x; return 1;}
    void write(int x) {
        if(!x) obuf[opt++] = '0'; else {if(x<0) obuf[opt++]='-',x=-x;int sn=0; while(x)str[sn++]=x%10+'0',x/=10;for (int i=sn-1;i>=0;i--) obuf[opt++]=str[i];}
        if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}
    }
    void write(char x) {obuf[opt++]=x;if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}}
    void Fflush() { if (opt) fwrite(obuf, 1, opt, stdout); opt=0;}
};
const int MAXN = 2e5 + 5;
int q, s[MAXN], t[MAXN];
struct Tree {
	int n, s1[MAXN], s2[MAXN], f[MAXN][20], ok = 1, dep[MAXN];
	vector < int > e[MAXN];
	void addedge(int u, int v) {e[u].pb(v);}
	void dfs(int u, int fa) {
		dep[u] = dep[fa] + 1;
		f[u][0] = fa; For(i, 1, 19) f[u][i] = f[f[fa][i-1]][i-1];
		for(auto v : e[u]) if(v != fa) dfs(v, u);
	}
	inline int lca(int u, int v) {
		if(dep[u] < dep[v]) swap(u, v);
		foR(i, 19, 0) if(dep[f[u][i]] >= dep[v]) u = f[u][i];
//		cerr << dep[u] << ' ' << dep[v]<< endl;
		if(u == v) return u;
		foR(i, 19, 0)
			if(f[u][i] != f[v][i]) u = f[u][i], v = f[v][i];
		return f[u][0];
	}
	void check(int u, int fa) {
		for(auto v : e[u]) {
			if(v == fa) continue;
			check(v, u);
			s1[u] += s1[v], s2[u] += s2[v];
		}
//		cerr << u << ' ' << s1[u] << ' ' << s2[u] << endl;
		if(dep[u] != 1 && s1[u] && s2[u]) ok = 0;
//		cerr << u << endl;
//		assert(s1[u] >= 0);assert(s2[u] >= 0);
	}
	bool solve() {
		For(i, 1, n) if(!f[i][0]) dfs(i, i);
		For(i, 1, q) {
			if(f[s[i]][19] != f[t[i]][19]) return 0;
		}
		For(i, 1, q) {
			int u = s[i], v = t[i], l = lca(u, v);
//			cerr << u << ' ' << v << ' ' << l << endl;
			s1[u]++, s1[l]--; s2[v]++, s2[l]--;
		}
//		cerr << endl;
		For(i, 1, n) {
			if(dep[i] == 1) check(i, i);
		}
		return ok;
	}

}T;
struct Graph {
	int n, m, bel[MAXN];
	map < Pair, int > cnt;
	vector < int > e[MAXN];
	int dfn[MAXN], low[MAXN], ind = 0, S[MAXN], top = 0, vis[MAXN<<1];
	void tarjan(int u, int fa) {
		dfn[u] = low[u] = ++ind; S[++top] = u;
		for(auto v : e[u]) {
			if(v == fa && cnt[mkp(u, v)] == 1) continue;
			if(dfn[v]) {
				low[u] = min(low[u], dfn[v]);
			} else {
				tarjan(v, u);
				low[u] = min(low[u], low[v]);
			}
		}
		if(low[u] == dfn[u]) {
//			cerr << u << endl;
			++T.n;
			while(S[top] != u)
				bel[S[top--]] = T.n;
			bel[S[top--]] = T.n;
		}
	}
	void init() {
		FI(n); FI(m); FI(q);
		while(m--) {
			int u = 0, v = 0; FI(u); FI(v);
			e[u].pb(v); e[v].pb(u); cnt[mkp(u, v)]++, cnt[mkp(v, u)]++;
		}
		For(i, 1, n) if(!dfn[i]) tarjan(i, 0);
//		For(i, 1, n) cerr << bel[i] << endl;
//		cerr << endl;
		For(u, 1, n) {
			for(auto v : e[u])
				if(bel[u] != bel[v]) T.addedge(bel[u], bel[v]);
		}
		For(i, 1, q) {
			FI(s[i]); FI(t[i]);
			s[i] = bel[s[i]], t[i] = bel[t[i]];
//			cerr << i << ' ' << s[i] << ' ' << t[i] << '*' << endl;
			if(s[i] == t[i]) i--, q--;
		}
//		For(i, 1, q) cerr << s[i] <<endl;
	}
}G;

signed main()
{
	#ifndef ONLINE_JUDGE
		file("pro");
	#endif
	G.init();
//	For(i, 1, q) cerr << s[i] << endl;
	printf(T.solve() ? "Yes\n" : "No\n");
    return FastIO::Fflush(), 0;
}
/*

*/


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mkp make_pair
#define rint register int
#define INF ((1 << 30) - 1)
#define FI(n) FastIO::read(n)
#define FO(n) FastIO::write(n)
#define Pair pair < int, int >
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(rint i = (k); i >= (j); i--)
#define For(i, k, j) for(rint i = (k); i <= (j); i++)
#define Foe(i, u) for(rint i = lst[u], v = e[i].v; i; i = e[i].nxt, v = e[i].v)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define file(s) freopen(s".in", "r", stdin); freopen(s".out", "w", stdout)
//#define int long long
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void mulmod(int &a, int b) {a = 1ll * a * b % P;}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
namespace FastIO {
    const int SIZE=1<<16; char buf[SIZE], obuf[SIZE], str[64]; int bi=SIZE, bn=SIZE, opt;
    int read(char *s) {
        while (bn) {for (;bi<bn&&buf[bi]<=' ';bi++);if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}
        int sn=0;while (bn) {for (;bi<bn&&buf[bi]>' ';bi++) s[sn++]=buf[bi];if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}s[sn]=0;return sn;
    }
    bool read(int& x) {if(x)x=0;int bf=0,n=read(str); if(!n)return 0; int i=0; if (str[i]=='-') bf=1,i=1; for(x=0;i<n;i++) x=x*10+str[i]-'0'; if(bf) x=-x; return 1;}
    void write(int x) {
        if(!x) obuf[opt++] = '0'; else {if(x<0) obuf[opt++]='-',x=-x;int sn=0; while(x)str[sn++]=x%10+'0',x/=10;for (int i=sn-1;i>=0;i--) obuf[opt++]=str[i];}
        if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}
    }
    void write(char x) {obuf[opt++]=x;if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}}
    void Fflush() { if (opt) fwrite(obuf, 1, opt, stdout); opt=0;}
};
const int MAXN = 2e5 + 5;
int q, s[MAXN], t[MAXN];
struct Tree {
	int n, s1[MAXN], s2[MAXN], f[MAXN][20], ok = 1, dep[MAXN];
	vector < int > e[MAXN];
	void addedge(int u, int v) {e[u].pb(v);}
	void dfs(int u, int fa) {
		dep[u] = dep[fa] + 1;
		f[u][0] = fa; For(i, 1, 19) f[u][i] = f[f[fa][i-1]][i-1];
		for(auto v : e[u]) if(v != fa) dfs(v, u);
	}
	inline int lca(int u, int v) {
		if(dep[u] < dep[v]) swap(u, v);
		foR(i, 19, 0) if(dep[f[u][i]] >= dep[v]) u = f[u][i];
//		cerr << dep[u] << ' ' << dep[v]<< endl;
		if(u == v) return u;
		foR(i, 19, 0)
			if(f[u][i] != f[v][i]) u = f[u][i], v = f[v][i];
		return f[u][0];
	}
	void check(int u, int fa) {
		for(auto v : e[u]) {
			if(v == fa) continue;
			check(v, u);
			s1[u] += s1[v], s2[u] += s2[v];
		}
//		cerr << u << ' ' << s1[u] << ' ' << s2[u] << endl;
		if(dep[u] != 1 && s1[u] && s2[u]) {
			ok = 0;
			if(q == 10000) {
				printf("%d %d %d\n", u, s1[u], s2[u]);
				exit(0);
			}
		}
//		cerr << u << endl;
//		assert(s1[u] >= 0);assert(s2[u] >= 0);
	}
	bool solve() {
		For(i, 1, n) if(!f[i][0]) dfs(i, i);
		For(i, 1, q) {
			if(f[s[i]][19] != f[t[i]][19]) {
				if(q == 10000) printf("%d\n", 1000000);
				return 0;
			}
		}
		For(i, 1, q) {
			int u = s[i], v = t[i], l = lca(u, v);
//			cerr << u << ' ' << v << ' ' << l << endl;
			s1[u]++, s1[l]--; s2[v]++, s2[l]--;
		}
//		cerr << endl;
		For(i, 1, n) {
			if(dep[i] == 1) check(i, i);
		}
		return ok;
	}

}T;
struct Graph {
	int n, m, bel[MAXN];
	map < Pair, int > cnt;
	vector < int > e[MAXN];
	int dfn[MAXN], low[MAXN], ind = 0, S[MAXN], top = 0, vis[MAXN<<1];
	void tarjan(int u, int fa) {
		dfn[u] = low[u] = ++ind; S[++top] = u;
		for(auto v : e[u]) {
			if(v == fa && cnt[mkp(u, v)] == 1) continue;
			if(dfn[v]) {
				low[u] = min(low[u], dfn[v]);
			} else {
				tarjan(v, u);
				low[u] = min(low[u], low[v]);
			}
		}
		if(low[u] == dfn[u]) {
//			cerr << u << endl;
			++T.n;
			while(S[top] != u)
				bel[S[top--]] = T.n;
			bel[S[top--]] = T.n;
		}
	}
	void init() {
		FI(n); FI(m); FI(q);
		while(m--) {
			int u = 0, v = 0; FI(u); FI(v);
			e[u].pb(v); e[v].pb(u); cnt[mkp(u, v)]++, cnt[mkp(v, u)]++;
		}
		For(i, 1, n) if(!dfn[i]) tarjan(i, 0);
//		For(i, 1, n) cerr << bel[i] << endl;
//		cerr << endl;
		For(u, 1, n) {
			for(auto v : e[u])
				if(bel[u] != bel[v]) T.addedge(bel[u], bel[v]);
		}
		For(i, 1, q) {
			FI(s[i]); FI(t[i]);
			s[i] = bel[s[i]], t[i] = bel[t[i]];
//			cerr << i << ' ' << s[i] << ' ' << t[i] << '*' << endl;
			if(s[i] == t[i]) i--, q--;
		}
//		For(i, 1, q) cerr << s[i] <<endl;
	}
}G;

signed main()
{
//	#ifndef ONLINE_JUDGE
//		file("pro");
//	#endif
	G.init();
//	For(i, 1, q) cerr << s[i] << endl;
	printf(T.solve() ? "Yes\n" : "No\n");
    return FastIO::Fflush(), 0;
}
/*

*/


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mkp make_pair
#define rint register int
#define INF ((1 << 30) - 1)
#define FI(n) FastIO::read(n)
#define FO(n) FastIO::write(n)
#define Pair pair < int, int >
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(rint i = (k); i >= (j); i--)
#define For(i, k, j) for(rint i = (k); i <= (j); i++)
#define Foe(i, u) for(rint i = lst[u], v = e[i].v; i; i = e[i].nxt, v = e[i].v)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define file(s) freopen(s".in", "r", stdin); freopen(s".out", "w", stdout)
//#define int long long
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void mulmod(int &a, int b) {a = 1ll * a * b % P;}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
namespace FastIO {
    const int SIZE=1<<16; char buf[SIZE], obuf[SIZE], str[64]; int bi=SIZE, bn=SIZE, opt;
    int read(char *s) {
        while (bn) {for (;bi<bn&&buf[bi]<=' ';bi++);if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}
        int sn=0;while (bn) {for (;bi<bn&&buf[bi]>' ';bi++) s[sn++]=buf[bi];if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}s[sn]=0;return sn;
    }
    bool read(int& x) {if(x)x=0;int bf=0,n=read(str); if(!n)return 0; int i=0; if (str[i]=='-') bf=1,i=1; for(x=0;i<n;i++) x=x*10+str[i]-'0'; if(bf) x=-x; return 1;}
    void write(int x) {
        if(!x) obuf[opt++] = '0'; else {if(x<0) obuf[opt++]='-',x=-x;int sn=0; while(x)str[sn++]=x%10+'0',x/=10;for (int i=sn-1;i>=0;i--) obuf[opt++]=str[i];}
        if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}
    }
    void write(char x) {obuf[opt++]=x;if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}}
    void Fflush() { if (opt) fwrite(obuf, 1, opt, stdout); opt=0;}
};
const int MAXN = 2e5 + 5;
int q, s[MAXN], t[MAXN];
struct Tree {
	int n, s1[MAXN], s2[MAXN], f[MAXN][20], ok = 1, dep[MAXN];
	vector < int > e[MAXN];
	void addedge(int u, int v) {e[u].pb(v);}
	void dfs(int u, int fa) {
		dep[u] = dep[fa] + 1;
		f[u][0] = fa; For(i, 1, 19) f[u][i] = f[f[fa][i-1]][i-1];
		for(auto v : e[u]) if(v != fa) dfs(v, u);
	}
	int lca(int u, int v) {
		if(dep[u] < dep[v]) swap(u, v);
		foR(i, 19, 0) if(dep[f[u][i]] >= dep[v]) u = f[u][i];

		foR(i, 19, 0) {
			if(f[u][i] != f[v][i]) u = f[u][i], v = f[v][i];
		}
		return f[u][0];
	}
	void check(int u, int fa) {
		for(auto v : e[u]) {
			if(v == fa) continue;
			check(v, u);
			s1[u] += s1[v], s2[u] += s2[v];
		}
		if(s1[u] && s2[u]) ok = 0;
//		assert(s1[u] >= 0);assert(s2[u] >= 0);
	}
	bool solve() {
		For(i, 1, n) if(!f[i][0]) dfs(i, i);
		For(i, 1, q) {
			if(f[s[i]][19] != f[t[i]][19]) return 0;
		}
		For(i, 1, q) {
			int u = s[i], v = t[i], l = lca(u, v);
			s1[u]++, s1[l]--; s2[v]++, s2[l]--;
		}
		For(i, 1, n) {
			if(f[i][0] == i) check(i, i);
		}
		return ok;
	}

}T;
struct Graph {
	int n, m, bel[MAXN];
	map < Pair, int > cnt;
	vector < int > e[MAXN];
	int dfn[MAXN], low[MAXN], ind = 0, S[MAXN], top = 0, vis[MAXN<<1];
	void tarjan(int u, int fa) {
		dfn[u] = low[u] = ++ind; S[++top] = u;
		for(auto v : e[u]) {
			if(v == fa && cnt[mkp(u, v)] == 1) continue;
			if(dfn[v]) {
				low[u] = min(low[u], dfn[v]);
			} else {
				tarjan(v, u);
				low[u] = min(low[u], low[v]);
			}
		}
		if(low[u] == dfn[u]) {
//			cerr << u << endl;
			++T.n;
			while(S[top] != u)
				bel[S[top--]] = T.n;
			bel[S[top--]] = T.n;
		}
	}
	void init() {
		FI(n); FI(m); FI(q);
		while(m--) {
			int u = 0, v = 0; FI(u); FI(v);
			e[u].pb(v); e[v].pb(u); cnt[mkp(u, v)]++, cnt[mkp(v, u)]++;
		}
		For(i, 1, n) if(!dfn[i]) tarjan(i, 0);
//		For(i, 1, n) cerr << bel[i] << endl;
		For(u, 1, n) {
			for(auto v : e[u])
				if(bel[u] != bel[v]) T.addedge(bel[u], bel[v]);
		}
		For(i, 1, q) {
			FI(s[i]); FI(t[i]);
			s[i] = bel[s[i]], t[i] = bel[t[i]];
//			cerr << i << ' ' << s[i] << ' ' << t[i] << '*' << endl;
			if(s[i] == t[i]) i--, q--;
		}
//		For(i, 1, q) cerr << s[i] <<endl;
	}
}G;

signed main()
{
	#ifndef ONLINE_JUDGE
		file("pro");
	#endif
	G.init();
//	For(i, 1, q) cerr << s[i] << endl;
	printf(T.solve() ? "Yes\n" : "No\n");
    return FastIO::Fflush(), 0;
}
/*

*/


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mkp make_pair
#define rint register int
#define INF ((1 << 30) - 1)
#define FI(n) FastIO::read(n)
#define FO(n) FastIO::write(n)
#define Pair pair < int, int >
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(rint i = (k); i >= (j); i--)
#define For(i, k, j) for(rint i = (k); i <= (j); i++)
#define Foe(i, u) for(rint i = lst[u], v = e[i].v; i; i = e[i].nxt, v = e[i].v)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define file(s) freopen(s".in", "r", stdin); freopen(s".out", "w", stdout)
//#define int long long
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void mulmod(int &a, int b) {a = 1ll * a * b % P;}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
namespace FastIO {
    const int SIZE=1<<16; char buf[SIZE], obuf[SIZE], str[64]; int bi=SIZE, bn=SIZE, opt;
    int read(char *s) {
        while (bn) {for (;bi<bn&&buf[bi]<=' ';bi++);if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}
        int sn=0;while (bn) {for (;bi<bn&&buf[bi]>' ';bi++) s[sn++]=buf[bi];if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}s[sn]=0;return sn;
    }
    bool read(int& x) {if(x)x=0;int bf=0,n=read(str); if(!n)return 0; int i=0; if (str[i]=='-') bf=1,i=1; for(x=0;i<n;i++) x=x*10+str[i]-'0'; if(bf) x=-x; return 1;}
    void write(int x) {
        if(!x) obuf[opt++] = '0'; else {if(x<0) obuf[opt++]='-',x=-x;int sn=0; while(x)str[sn++]=x%10+'0',x/=10;for (int i=sn-1;i>=0;i--) obuf[opt++]=str[i];}
        if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}
    }
    void write(char x) {obuf[opt++]=x;if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}}
    void Fflush() { if (opt) fwrite(obuf, 1, opt, stdout); opt=0;}
};
const int MAXN = 2e5 + 5;
int q, s[MAXN], t[MAXN];
struct Tree {
	int n, s1[MAXN], s2[MAXN], f[MAXN][20], ok = 1, dep[MAXN];
	vector < int > e[MAXN];
	void addedge(int u, int v) {e[u].pb(v);}
	void dfs(int u, int fa) {
		dep[u] = dep[fa] + 1;
		f[u][0] = fa; For(i, 1, 19) f[u][i] = f[f[fa][i-1]][i-1];
		for(auto v : e[u]) if(v != fa) dfs(v, u);
	}
	inline int lca(int u, int v) {
		if(dep[u] < dep[v]) swap(u, v);
		foR(i, 19, 0) if(dep[f[u][i]] >= dep[v]) u = f[u][i];
//		cerr << dep[u] << ' ' << dep[v]<< endl;
		if(u == v) return u;
		foR(i, 19, 0)
			if(f[u][i] != f[v][i]) u = f[u][i], v = f[v][i];
		return f[u][0];
	}
	void check(int u, int fa) {
		for(auto v : e[u]) {
			if(v == fa) continue;
			check(v, u);
			s1[u] += s1[v], s2[u] += s2[v];
		}
//		cerr << u << ' ' << s1[u] << ' ' << s2[u] << endl;
		if(dep[u] != 1 && s1[u] && s2[u]) ok = 0;
//		cerr << u << endl;
//		assert(s1[u] >= 0);assert(s2[u] >= 0);
	}
	bool solve() {
		For(i, 1, n) if(!f[i][0]) dfs(i, i);
		For(i, 1, q) {
			if(f[s[i]][19] != f[t[i]][19]) return 0;
		}
		For(i, 1, q) {
			int u = s[i], v = t[i], l = lca(u, v);
//			cerr << u << ' ' << v << ' ' << l << endl;
			s1[u]++, s1[l]--; s2[v]++, s2[l]--;
		}
//		cerr << endl;
		For(i, 1, n) {
			if(dep[i] == 1) {
				assert(f[i][0] == i); check(i, i);
			}
		}
		return ok;
	}

}T;
struct Graph {
	int n, m, bel[MAXN];
	map < Pair, int > cnt;
	vector < int > e[MAXN];
	int dfn[MAXN], low[MAXN], ind = 0, S[MAXN], top = 0, vis[MAXN<<1];
	void tarjan(int u, int fa) {
		dfn[u] = low[u] = ++ind; S[++top] = u;
		for(auto v : e[u]) {
			if(v == fa && cnt[mkp(u, v)] == 1) continue;
			if(dfn[v]) {
				low[u] = min(low[u], dfn[v]);
			} else {
				tarjan(v, u);
				low[u] = min(low[u], low[v]);
			}
		}
		if(low[u] == dfn[u]) {
//			cerr << u << endl;
			++T.n;
			while(S[top] != u)
				bel[S[top--]] = T.n;
			bel[S[top--]] = T.n;
		}
	}
	void init() {
		FI(n); FI(m); FI(q);
		while(m--) {
			int u = 0, v = 0; FI(u); FI(v);
			e[u].pb(v); e[v].pb(u); cnt[mkp(u, v)]++, cnt[mkp(v, u)]++;
		}
		For(i, 1, n) if(!dfn[i]) tarjan(i, 0);
//		For(i, 1, n) cerr << bel[i] << endl;
//		cerr << endl;
		For(u, 1, n) {
			for(auto v : e[u])
				if(bel[u] != bel[v]) T.addedge(bel[u], bel[v]);
		}
		For(i, 1, q) {
			FI(s[i]); FI(t[i]);
			s[i] = bel[s[i]], t[i] = bel[t[i]];
//			cerr << i << ' ' << s[i] << ' ' << t[i] << '*' << endl;
			if(s[i] == t[i]) i--, q--;
		}
//		For(i, 1, q) cerr << s[i] <<endl;
	}
}G;

signed main()
{
	#ifndef ONLINE_JUDGE
		file("pro");
	#endif
	G.init();
//	For(i, 1, q) cerr << s[i] << endl;
	printf(T.solve() ? "Yes\n" : "No\n");
    return FastIO::Fflush(), 0;
}
/*

*/


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mkp make_pair
#define rint register int
#define INF ((1 << 30) - 1)
#define FI(n) FastIO::read(n)
#define FO(n) FastIO::write(n)
#define Pair pair < int, int >
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(rint i = (k); i >= (j); i--)
#define For(i, k, j) for(rint i = (k); i <= (j); i++)
#define Foe(i, u) for(rint i = lst[u], v = e[i].v; i; i = e[i].nxt, v = e[i].v)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define file(s) freopen(s".in", "r", stdin); freopen(s".out", "w", stdout)
//#define int long long
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void mulmod(int &a, int b) {a = 1ll * a * b % P;}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
namespace FastIO {
    const int SIZE=1<<16; char buf[SIZE], obuf[SIZE], str[64]; int bi=SIZE, bn=SIZE, opt;
    int read(char *s) {
        while (bn) {for (;bi<bn&&buf[bi]<=' ';bi++);if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}
        int sn=0;while (bn) {for (;bi<bn&&buf[bi]>' ';bi++) s[sn++]=buf[bi];if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}s[sn]=0;return sn;
    }
    bool read(int& x) {if(x)x=0;int bf=0,n=read(str); if(!n)return 0; int i=0; if (str[i]=='-') bf=1,i=1; for(x=0;i<n;i++) x=x*10+str[i]-'0'; if(bf) x=-x; return 1;}
    void write(int x) {
        if(!x) obuf[opt++] = '0'; else {if(x<0) obuf[opt++]='-',x=-x;int sn=0; while(x)str[sn++]=x%10+'0',x/=10;for (int i=sn-1;i>=0;i--) obuf[opt++]=str[i];}
        if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}
    }
    void write(char x) {obuf[opt++]=x;if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}}
    void Fflush() { if (opt) fwrite(obuf, 1, opt, stdout); opt=0;}
};
const int MAXN = 2e5 + 5;
int q, s[MAXN], t[MAXN];
struct Tree {
	int n, s1[MAXN], s2[MAXN], f[MAXN][20], ok = 1, dep[MAXN];
	vector < int > e[MAXN];
	void addedge(int u, int v) {e[u].pb(v);}
	void dfs(int u, int fa) {
		dep[u] = dep[fa] + 1;
		f[u][0] = fa; For(i, 1, 19) f[u][i] = f[f[fa][i-1]][i-1];
		for(auto v : e[u]) if(v != fa) dfs(v, u);
	}
	inline int lca(int u, int v) {
		if(dep[u] < dep[v]) swap(u, v);
		foR(i, 19, 0) if(dep[f[u][i]] >= dep[v]) u = f[u][i];
//		cerr << dep[u] << ' ' << dep[v]<< endl;
		if(u == v) return u;
		foR(i, 19, 0)
			if(f[u][i] != f[v][i]) u = f[u][i], v = f[v][i];
		return f[u][0];
	}
	void check(int u, int fa) {
		for(auto v : e[u]) {
			if(v == fa) continue;
			check(v, u);
			s1[u] += s1[v], s2[u] += s2[v];
		}
//		cerr << u << ' ' << s1[u] << ' ' << s2[u] << endl;
		if(dep[u] != 1 && s1[u] && s2[u]) {
			ok = 0;
			if(q == 10000) {
				printf("%d %d %d\n", u, s1[u], s2[u]);
				exit(0);
			}
		}
//		cerr << u << endl;
//		assert(s1[u] >= 0);assert(s2[u] >= 0);
	}
	bool solve() {
		For(i, 1, n) if(!f[i][0]) dfs(i, i);
		For(i, 1, q) {
			if(f[s[i]][19] != f[t[i]][19]) {
				if(q == 10000) printf("%d\n", 1000000);
				return 0;
			}
		}
		For(i, 1, q) {
			int u = s[i], v = t[i], l = lca(u, v);
//			cerr << u << ' ' << v << ' ' << l << endl;
			s1[u]++, s1[l]--; s2[v]++, s2[l]--;
			if(q == 10000) {
				assert(u == l || v == l);
			}
		}
//		cerr << endl;
		For(i, 1, n) {
			if(dep[i] == 1) check(i, i);
		}
		return ok;
	}

}T;
struct Graph {
	int n, m, bel[MAXN];
	map < Pair, int > cnt;
	vector < int > e[MAXN];
	int dfn[MAXN], low[MAXN], ind = 0, S[MAXN], top = 0, vis[MAXN<<1];
	void tarjan(int u, int fa) {
		dfn[u] = low[u] = ++ind; S[++top] = u;
		for(auto v : e[u]) {
			if(v == fa && cnt[mkp(u, v)] == 1) continue;
			if(dfn[v]) {
				low[u] = min(low[u], dfn[v]);
			} else {
				tarjan(v, u);
				low[u] = min(low[u], low[v]);
			}
		}
		if(low[u] == dfn[u]) {
//			cerr << u << endl;
			++T.n;
			while(S[top] != u)
				bel[S[top--]] = T.n;
			bel[S[top--]] = T.n;
		}
	}
	void init() {
		FI(n); FI(m); FI(q);
		while(m--) {
			int u = 0, v = 0; FI(u); FI(v);
			e[u].pb(v); e[v].pb(u); cnt[mkp(u, v)]++, cnt[mkp(v, u)]++;
		}
		For(i, 1, n) if(!dfn[i]) tarjan(i, 0);
//		For(i, 1, n) cerr << bel[i] << endl;
//		cerr << endl;
		For(u, 1, n) {
			for(auto v : e[u])
				if(bel[u] != bel[v]) T.addedge(bel[u], bel[v]);
		}
		For(i, 1, q) {
			FI(s[i]); FI(t[i]);
			s[i] = bel[s[i]], t[i] = bel[t[i]];
//			cerr << i << ' ' << s[i] << ' ' << t[i] << '*' << endl;
			if(s[i] == t[i]) i--, q--;
		}
//		For(i, 1, q) cerr << s[i] <<endl;
	}
}G;

signed main()
{
//	#ifndef ONLINE_JUDGE
//		file("pro");
//	#endif
	G.init();
//	For(i, 1, q) cerr << s[i] << endl;
	printf(T.solve() ? "Yes\n" : "No\n");
    return FastIO::Fflush(), 0;
}
/*

*/


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mkp make_pair
#define rint register int
#define INF ((1 << 30) - 1)
#define FI(n) FastIO::read(n)
#define FO(n) FastIO::write(n)
#define Pair pair < int, int >
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(rint i = (k); i >= (j); i--)
#define For(i, k, j) for(rint i = (k); i <= (j); i++)
#define Foe(i, u) for(rint i = lst[u], v = e[i].v; i; i = e[i].nxt, v = e[i].v)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define file(s) freopen(s".in", "r", stdin); freopen(s".out", "w", stdout)
//#define int long long
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void mulmod(int &a, int b) {a = 1ll * a * b % P;}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
namespace FastIO {
    const int SIZE=1<<16; char buf[SIZE], obuf[SIZE], str[64]; int bi=SIZE, bn=SIZE, opt;
    int read(char *s) {
        while (bn) {for (;bi<bn&&buf[bi]<=' ';bi++);if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}
        int sn=0;while (bn) {for (;bi<bn&&buf[bi]>' ';bi++) s[sn++]=buf[bi];if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}s[sn]=0;return sn;
    }
    bool read(int& x) {if(x)x=0;int bf=0,n=read(str); if(!n)return 0; int i=0; if (str[i]=='-') bf=1,i=1; for(x=0;i<n;i++) x=x*10+str[i]-'0'; if(bf) x=-x; return 1;}
    void write(int x) {
        if(!x) obuf[opt++] = '0'; else {if(x<0) obuf[opt++]='-',x=-x;int sn=0; while(x)str[sn++]=x%10+'0',x/=10;for (int i=sn-1;i>=0;i--) obuf[opt++]=str[i];}
        if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}
    }
    void write(char x) {obuf[opt++]=x;if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}}
    void Fflush() { if (opt) fwrite(obuf, 1, opt, stdout); opt=0;}
};
const int MAXN = 2e5 + 5;
int q, s[MAXN], t[MAXN];
struct Tree {
	int n, s1[MAXN], s2[MAXN], f[MAXN][20], ok = 1, dep[MAXN];
	vector < int > e[MAXN];
	void addedge(int u, int v) {e[u].pb(v);}
	void dfs(int u, int fa) {
		dep[u] = dep[fa] + 1;
		f[u][0] = fa; For(i, 1, 19) f[u][i] = f[f[fa][i-1]][i-1];
		for(auto v : e[u]) if(v != fa) dfs(v, u);
	}
	inline int lca(int u, int v) {
		if(dep[u] < dep[v]) swap(u, v);
		foR(i, 19, 0) if(dep[f[u][i]] >= dep[v]) u = f[u][i];
//		cerr << dep[u] << ' ' << dep[v]<< endl;
		if(u == v) return u;
		foR(i, 19, 0)
			if(f[u][i] != f[v][i]) u = f[u][i], v = f[v][i];
		return f[u][0];
	}
	void check(int u, int fa) {
		for(auto v : e[u]) {
			if(v == fa) continue;
			check(v, u);
			s1[u] += s1[v], s2[u] += s2[v];
		}
//		cerr << u << ' ' << s1[u] << ' ' << s2[u] << endl;
		if(dep[u] != 1 && s1[u] && s2[u]) {
			ok = 0;
			if(Qnum == 10000) {
				printf("%d\n", u);
				exit(0);
			}
		}
//		cerr << u << endl;
//		assert(s1[u] >= 0);assert(s2[u] >= 0);
	}
	bool solve() {
		For(i, 1, n) if(!f[i][0]) dfs(i, i);
		For(i, 1, q) {
			if(f[s[i]][19] != f[t[i]][19]) {
				if(Qnum == 10000) printf("%d\n", 2323);
				return 0;
			}
		}
		For(i, 1, q) {
			int u = s[i], v = t[i], l = lca(u, v);
//			cerr << u << ' ' << v << ' ' << l << endl;
			s1[u]++, s1[l]--; s2[v]++, s2[l]--;
		}
//		cerr << endl;
		For(i, 1, n) {
			if(dep[i] == 1) check(i, i);
		}
		return ok;
	}

}T;
struct Graph {
	int n, m, bel[MAXN];
	map < Pair, int > cnt;
	vector < int > e[MAXN];
	int dfn[MAXN], low[MAXN], ind = 0, S[MAXN], top = 0, vis[MAXN<<1];
	void tarjan(int u, int fa) {
		dfn[u] = low[u] = ++ind; S[++top] = u;
		for(auto v : e[u]) {
			if(v == fa && cnt[mkp(u, v)] == 1) continue;
			if(dfn[v]) {
				low[u] = min(low[u], dfn[v]);
			} else {
				tarjan(v, u);
				low[u] = min(low[u], low[v]);
			}
		}
		if(low[u] == dfn[u]) {
//			cerr << u << endl;
			++T.n;
			while(S[top] != u)
				bel[S[top--]] = T.n;
			bel[S[top--]] = T.n;
		}
	}
	void init() {
		FI(n); FI(m); FI(q);
		while(m--) {
			int u = 0, v = 0; FI(u); FI(v);
			e[u].pb(v); e[v].pb(u); cnt[mkp(u, v)]++, cnt[mkp(v, u)]++;
		}
		For(i, 1, n) if(!dfn[i]) tarjan(i, 0);
//		For(i, 1, n) cerr << bel[i] << endl;
//		cerr << endl;
		For(u, 1, n) {
			for(auto v : e[u])
				if(bel[u] != bel[v]) T.addedge(bel[u], bel[v]);
		}
		For(i, 1, q) {
			FI(s[i]); FI(t[i]);
			s[i] = bel[s[i]], t[i] = bel[t[i]];
//			cerr << i << ' ' << s[i] << ' ' << t[i] << '*' << endl;
			if(s[i] == t[i]) i--, q--;
		}
//		For(i, 1, q) cerr << s[i] <<endl;
	}
}G;

signed main()
{
//	#ifndef ONLINE_JUDGE
//		file("pro");
//	#endif
	G.init();
//	For(i, 1, q) cerr << s[i] << endl;
	printf(T.solve() ? "Yes\n" : "No\n");
    return FastIO::Fflush(), 0;
}
/*

*/


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mkp make_pair
#define rint register int
#define INF ((1 << 30) - 1)
#define FI(n) FastIO::read(n)
#define FO(n) FastIO::write(n)
#define Pair pair < int, int >
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(rint i = (k); i >= (j); i--)
#define For(i, k, j) for(rint i = (k); i <= (j); i++)
#define Foe(i, u) for(rint i = lst[u], v = e[i].v; i; i = e[i].nxt, v = e[i].v)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define file(s) freopen(s".in", "r", stdin); freopen(s".out", "w", stdout)
//#define int long long
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void mulmod(int &a, int b) {a = 1ll * a * b % P;}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
namespace FastIO {
    const int SIZE=1<<16; char buf[SIZE], obuf[SIZE], str[64]; int bi=SIZE, bn=SIZE, opt;
    int read(char *s) {
        while (bn) {for (;bi<bn&&buf[bi]<=' ';bi++);if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}
        int sn=0;while (bn) {for (;bi<bn&&buf[bi]>' ';bi++) s[sn++]=buf[bi];if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}s[sn]=0;return sn;
    }
    bool read(int& x) {if(x)x=0;int bf=0,n=read(str); if(!n)return 0; int i=0; if (str[i]=='-') bf=1,i=1; for(x=0;i<n;i++) x=x*10+str[i]-'0'; if(bf) x=-x; return 1;}
    void write(int x) {
        if(!x) obuf[opt++] = '0'; else {if(x<0) obuf[opt++]='-',x=-x;int sn=0; while(x)str[sn++]=x%10+'0',x/=10;for (int i=sn-1;i>=0;i--) obuf[opt++]=str[i];}
        if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}
    }
    void write(char x) {obuf[opt++]=x;if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}}
    void Fflush() { if (opt) fwrite(obuf, 1, opt, stdout); opt=0;}
};
const int MAXN = 2e5 + 5;
int q, s[MAXN], t[MAXN];
struct Tree {
	int n, s1[MAXN], s2[MAXN], f[MAXN][20], ok = 1, dep[MAXN];
	vector < int > e[MAXN];
	void addedge(int u, int v) {e[u].pb(v);}
	void dfs(int u, int fa) {
		dep[u] = dep[fa] + 1;
		f[u][0] = fa; For(i, 1, 19) f[u][i] = f[f[fa][i-1]][i-1];
		for(auto v : e[u]) if(v != fa) dfs(v, u);
	}
	int lca(int u, int v) {
		if(dep[u] > dep[v]) swap(u, v);
		foR(i, 19, 0) if(dep[f[u][i]] < dep[v]) u = f[u][i];
		foR(i, 19, 0) {
			if(f[u][i] != f[v][i]) u = f[u][i], v = f[v][i];
		}
		return f[u][0];
	}
	void check(int u, int fa) {
		for(auto v : e[u]) {
			if(v == fa) continue;
			check(v, u);
			s1[u] += s1[v], s2[u] += s2[v];
		}
		if(s1[u] && s2[u]) ok = 0;
//		assert(s1[u] >= 0);assert(s2[u] >= 0);
	}
	bool solve() {
		For(i, 1, n) if(!f[i][0]) dfs(i, i);
		For(i, 1, q) {
			if(f[s[i]][19] != f[t[i]][19]) return 0;
		}
		For(i, 1, q) {
			int u = s[i], v = t[i], l = lca(u, v);
			s1[u]++, s1[l]--; s2[v]++, s2[l]--;
		}
		For(i, 1, n) {
			if(f[i][0] == i) check(i, i);
		}
		return ok;
	}

}T;
struct Graph {
	int n, m, bel[MAXN];
	map < Pair, int > cnt;
	vector < int > e[MAXN];
	int dfn[MAXN], low[MAXN], ind = 0, S[MAXN], top = 0, vis[MAXN<<1];
	void tarjan(int u, int fa) {
		dfn[u] = low[u] = ++ind; S[++top] = u;
		for(auto v : e[u]) {
			if(v == fa && cnt[mkp(u, v)] == 1) continue;
			if(dfn[v]) {
				low[u] = min(low[u], dfn[v]);
			} else {
				tarjan(v, u);
				low[u] = min(low[u], low[v]);
			}
		}
		if(low[u] == dfn[u]) {
//			cerr << u << endl;
			++T.n;
			while(S[top] != u)
				bel[S[top--]] = T.n;
			bel[S[top--]] = T.n;
		}
	}
	void init() {
		FI(n); FI(m); FI(q);
		while(m--) {
			int u = 0, v = 0; FI(u); FI(v);
			e[u].pb(v); e[v].pb(u); cnt[mkp(u, v)]++, cnt[mkp(v, u)]++;
		}
		For(i, 1, n) if(!dfn[i]) tarjan(i, 0);
//		For(i, 1, n) cerr << bel[i] << endl;
		For(u, 1, n) {
			for(auto v : e[u])
				if(bel[u] != bel[v]) T.addedge(bel[u], bel[v]);
		}
		For(i, 1, q) {
			FI(s[i]); FI(t[i]);
			s[i] = bel[s[i]], t[i] = bel[t[i]];
//			cerr << i << ' ' << s[i] << ' ' << t[i] << '*' << endl;
			if(s[i] == t[i]) i--, q--;
		}
//		For(i, 1, q) cerr << s[i] <<endl;
	}
}G;

signed main()
{
	#ifndef ONLINE_JUDGE
		file("pro");
	#endif
	G.init();
//	For(i, 1, q) cerr << s[i] << endl;
	printf(T.solve() ? "Yes\n" : "No\n");
    return FastIO::Fflush(), 0;
}
/*

*/


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mkp make_pair
#define rint register int
#define INF ((1 << 30) - 1)
#define FI(n) FastIO::read(n)
#define FO(n) FastIO::write(n)
#define Pair pair < int, int >
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(rint i = (k); i >= (j); i--)
#define For(i, k, j) for(rint i = (k); i <= (j); i++)
#define Foe(i, u) for(rint i = lst[u], v = e[i].v; i; i = e[i].nxt, v = e[i].v)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define file(s) freopen(s".in", "r", stdin); freopen(s".out", "w", stdout)
//#define int long long
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void mulmod(int &a, int b) {a = 1ll * a * b % P;}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
namespace FastIO {
    const int SIZE=1<<16; char buf[SIZE], obuf[SIZE], str[64]; int bi=SIZE, bn=SIZE, opt;
    int read(char *s) {
        while (bn) {for (;bi<bn&&buf[bi]<=' ';bi++);if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}
        int sn=0;while (bn) {for (;bi<bn&&buf[bi]>' ';bi++) s[sn++]=buf[bi];if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}s[sn]=0;return sn;
    }
    bool read(int& x) {if(x)x=0;int bf=0,n=read(str); if(!n)return 0; int i=0; if (str[i]=='-') bf=1,i=1; for(x=0;i<n;i++) x=x*10+str[i]-'0'; if(bf) x=-x; return 1;}
    void write(int x) {
        if(!x) obuf[opt++] = '0'; else {if(x<0) obuf[opt++]='-',x=-x;int sn=0; while(x)str[sn++]=x%10+'0',x/=10;for (int i=sn-1;i>=0;i--) obuf[opt++]=str[i];}
        if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}
    }
    void write(char x) {obuf[opt++]=x;if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}}
    void Fflush() { if (opt) fwrite(obuf, 1, opt, stdout); opt=0;}
};
const int MAXN = 2e5 + 5;
int q, s[MAXN], t[MAXN];
struct Tree {
	int n, s1[MAXN], s2[MAXN], f[MAXN][20], ok = 1, dep[MAXN];
	vector < int > e[MAXN];
	void addedge(int u, int v) {e[u].pb(v);}
	void dfs(int u, int fa) {
		dep[u] = dep[fa] + 1;
		f[u][0] = fa; For(i, 1, 19) f[u][i] = f[f[fa][i-1]][i-1];
		for(auto v : e[u]) if(v != fa) dfs(v, u);
	}
	int lca(int u, int v) {
		if(dep[u] > dep[v]) swap(u, v);
		foR(i, 19, 0) if(dep[f[u][i]] >= dep[v]) u = f[u][i];

		foR(i, 19, 0) {
			if(f[u][i] != f[v][i]) u = f[u][i], v = f[v][i];
		}
		return f[u][0];
	}
	void check(int u, int fa) {
		for(auto v : e[u]) {
			if(v == fa) continue;
			check(v, u);
			s1[u] += s1[v], s2[u] += s2[v];
		}
		if(s1[u] && s2[u]) ok = 0;
//		assert(s1[u] >= 0);assert(s2[u] >= 0);
	}
	bool solve() {
		For(i, 1, n) if(!f[i][0]) dfs(i, i);
		For(i, 1, q) {
			if(f[s[i]][19] != f[t[i]][19]) return 0;
		}
		For(i, 1, q) {
			int u = s[i], v = t[i], l = lca(u, v);
			s1[u]++, s1[l]--; s2[v]++, s2[l]--;
		}
		For(i, 1, n) {
			if(f[i][0] == i) check(i, i);
		}
		return ok;
	}

}T;
struct Graph {
	int n, m, bel[MAXN];
	map < Pair, int > cnt;
	vector < int > e[MAXN];
	int dfn[MAXN], low[MAXN], ind = 0, S[MAXN], top = 0, vis[MAXN<<1];
	void tarjan(int u, int fa) {
		dfn[u] = low[u] = ++ind; S[++top] = u;
		for(auto v : e[u]) {
			if(v == fa && cnt[mkp(u, v)] == 1) continue;
			if(dfn[v]) {
				low[u] = min(low[u], dfn[v]);
			} else {
				tarjan(v, u);
				low[u] = min(low[u], low[v]);
			}
		}
		if(low[u] == dfn[u]) {
//			cerr << u << endl;
			++T.n;
			while(S[top] != u)
				bel[S[top--]] = T.n;
			bel[S[top--]] = T.n;
		}
	}
	void init() {
		FI(n); FI(m); FI(q);
		while(m--) {
			int u = 0, v = 0; FI(u); FI(v);
			e[u].pb(v); e[v].pb(u); cnt[mkp(u, v)]++, cnt[mkp(v, u)]++;
		}
		For(i, 1, n) if(!dfn[i]) tarjan(i, 0);
//		For(i, 1, n) cerr << bel[i] << endl;
		For(u, 1, n) {
			for(auto v : e[u])
				if(bel[u] != bel[v]) T.addedge(bel[u], bel[v]);
		}
		For(i, 1, q) {
			FI(s[i]); FI(t[i]);
			s[i] = bel[s[i]], t[i] = bel[t[i]];
//			cerr << i << ' ' << s[i] << ' ' << t[i] << '*' << endl;
			if(s[i] == t[i]) i--, q--;
		}
//		For(i, 1, q) cerr << s[i] <<endl;
	}
}G;

signed main()
{
	#ifndef ONLINE_JUDGE
		file("pro");
	#endif
	G.init();
//	For(i, 1, q) cerr << s[i] << endl;
	printf(T.solve() ? "Yes\n" : "No\n");
    return FastIO::Fflush(), 0;
}
/*

*/


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mkp make_pair
#define rint register int
#define INF ((1 << 30) - 1)
#define FI(n) FastIO::read(n)
#define FO(n) FastIO::write(n)
#define Pair pair < int, int >
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(rint i = (k); i >= (j); i--)
#define For(i, k, j) for(rint i = (k); i <= (j); i++)
#define Foe(i, u) for(rint i = lst[u], v = e[i].v; i; i = e[i].nxt, v = e[i].v)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define file(s) freopen(s".in", "r", stdin); freopen(s".out", "w", stdout)
//#define int long long
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void mulmod(int &a, int b) {a = 1ll * a * b % P;}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
namespace FastIO {
    const int SIZE=1<<16; char buf[SIZE], obuf[SIZE], str[64]; int bi=SIZE, bn=SIZE, opt;
    int read(char *s) {
        while (bn) {for (;bi<bn&&buf[bi]<=' ';bi++);if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}
        int sn=0;while (bn) {for (;bi<bn&&buf[bi]>' ';bi++) s[sn++]=buf[bi];if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}s[sn]=0;return sn;
    }
    bool read(int& x) {if(x)x=0;int bf=0,n=read(str); if(!n)return 0; int i=0; if (str[i]=='-') bf=1,i=1; for(x=0;i<n;i++) x=x*10+str[i]-'0'; if(bf) x=-x; return 1;}
    void write(int x) {
        if(!x) obuf[opt++] = '0'; else {if(x<0) obuf[opt++]='-',x=-x;int sn=0; while(x)str[sn++]=x%10+'0',x/=10;for (int i=sn-1;i>=0;i--) obuf[opt++]=str[i];}
        if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}
    }
    void write(char x) {obuf[opt++]=x;if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}}
    void Fflush() { if (opt) fwrite(obuf, 1, opt, stdout); opt=0;}
};
const int MAXN = 2e5 + 5;
int q, s[MAXN], t[MAXN];
struct Tree {
	int n, s1[MAXN], s2[MAXN], f[MAXN][20], ok = 1, dep[MAXN];
	vector < int > e[MAXN];
	void addedge(int u, int v) {e[u].pb(v);}
	void dfs(int u, int fa) {
		dep[u] = dep[fa] + 1;
		f[u][0] = fa; For(i, 1, 19) f[u][i] = f[f[fa][i-1]][i-1];
		for(auto v : e[u]) if(v != fa) dfs(v, u);
	}
	inline int lca(int u, int v) {
		if(dep[u] < dep[v]) swap(u, v);
		foR(i, 19, 0) if(dep[f[u][i]] >= dep[v]) u = f[u][i];
//		cerr << dep[u] << ' ' << dep[v]<< endl;
		if(u == v) return u;
		foR(i, 19, 0)
			if(f[u][i] != f[v][i]) u = f[u][i], v = f[v][i];
		return f[u][0];
	}
	void check(int u, int fa) {
		for(auto v : e[u]) {
			if(v == fa) continue;
			check(v, u);
			s1[u] += s1[v], s2[u] += s2[v];
		}
//		cerr << u << ' ' << s1[u] << ' ' << s2[u] << endl;
		if(dep[u] != 1 && s1[u] && s2[u]) ok = 0;
//		cerr << u << endl;
//		assert(s1[u] >= 0);assert(s2[u] >= 0);
	}
	bool solve() {
		For(i, 1, n) if(!f[i][0]) dfs(i, i);
//		For(i, 1, q) {
//			if(f[s[i]][19] != f[t[i]][19]) return 0;
//		}
		For(i, 1, q) {
			int u = s[i], v = t[i], l = lca(u, v);
//			cerr << u << ' ' << v << ' ' << l << endl;
			s1[u]++, s1[l]--; s2[v]++, s2[l]--;
		}
//		cerr << endl;
		For(i, 1, n) {
			if(dep[i] == 1) check(i, i);
		}
		return ok;
	}

}T;
struct Graph {
	int n, m, bel[MAXN];
	map < Pair, int > cnt;
	vector < int > e[MAXN];
	int dfn[MAXN], low[MAXN], ind = 0, S[MAXN], top = 0, vis[MAXN<<1];
	void tarjan(int u, int fa) {
		dfn[u] = low[u] = ++ind; S[++top] = u;
		for(auto v : e[u]) {
			if(v == fa && cnt[mkp(u, v)] == 1) continue;
			if(dfn[v]) {
				low[u] = min(low[u], dfn[v]);
			} else {
				tarjan(v, u);
				low[u] = min(low[u], low[v]);
			}
		}
		if(low[u] == dfn[u]) {
//			cerr << u << endl;
			++T.n;
			while(S[top] != u)
				bel[S[top--]] = T.n;
			bel[S[top--]] = T.n;
		}
	}
	void init() {
		FI(n); FI(m); FI(q);
		while(m--) {
			int u = 0, v = 0; FI(u); FI(v);
			e[u].pb(v); e[v].pb(u); cnt[mkp(u, v)]++, cnt[mkp(v, u)]++;
		}
		For(i, 1, n) if(!dfn[i]) tarjan(i, 0);
//		For(i, 1, n) cerr << bel[i] << endl;
//		cerr << endl;
		For(u, 1, n) {
			for(auto v : e[u])
				if(bel[u] != bel[v]) T.addedge(bel[u], bel[v]);
		}
		For(i, 1, q) {
			FI(s[i]); FI(t[i]);
			s[i] = bel[s[i]], t[i] = bel[t[i]];
//			cerr << i << ' ' << s[i] << ' ' << t[i] << '*' << endl;
			if(s[i] == t[i]) i--, q--;
		}
//		For(i, 1, q) cerr << s[i] <<endl;
	}
}G;

signed main()
{
//	#ifndef ONLINE_JUDGE
//		file("pro");
//	#endif
	G.init();
//	For(i, 1, q) cerr << s[i] << endl;
	printf(T.solve() ? "Yes\n" : "No\n");
    return FastIO::Fflush(), 0;
}
/*

*/


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mkp make_pair
#define rint register int
#define INF ((1 << 30) - 1)
#define FI(n) FastIO::read(n)
#define FO(n) FastIO::write(n)
#define Pair pair < int, int >
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(rint i = (k); i >= (j); i--)
#define For(i, k, j) for(rint i = (k); i <= (j); i++)
#define Foe(i, u) for(rint i = lst[u], v = e[i].v; i; i = e[i].nxt, v = e[i].v)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define file(s) freopen(s".in", "r", stdin); freopen(s".out", "w", stdout)
//#define int long long
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void mulmod(int &a, int b) {a = 1ll * a * b % P;}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
namespace FastIO {
    const int SIZE=1<<16; char buf[SIZE], obuf[SIZE], str[64]; int bi=SIZE, bn=SIZE, opt;
    int read(char *s) {
        while (bn) {for (;bi<bn&&buf[bi]<=' ';bi++);if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}
        int sn=0;while (bn) {for (;bi<bn&&buf[bi]>' ';bi++) s[sn++]=buf[bi];if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}s[sn]=0;return sn;
    }
    bool read(int& x) {if(x)x=0;int bf=0,n=read(str); if(!n)return 0; int i=0; if (str[i]=='-') bf=1,i=1; for(x=0;i<n;i++) x=x*10+str[i]-'0'; if(bf) x=-x; return 1;}
    void write(int x) {
        if(!x) obuf[opt++] = '0'; else {if(x<0) obuf[opt++]='-',x=-x;int sn=0; while(x)str[sn++]=x%10+'0',x/=10;for (int i=sn-1;i>=0;i--) obuf[opt++]=str[i];}
        if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}
    }
    void write(char x) {obuf[opt++]=x;if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}}
    void Fflush() { if (opt) fwrite(obuf, 1, opt, stdout); opt=0;}
};
const int MAXN = 2e5 + 5;
int q, s[MAXN], t[MAXN];
struct Tree {
	int n, s1[MAXN], s2[MAXN], f[MAXN][20], ok = 1, dep[MAXN];
	vector < int > e[MAXN];
	void addedge(int u, int v) {e[u].pb(v);}
	void dfs(int u, int fa) {
		dep[u] = dep[fa] + 1;
		f[u][0] = fa; For(i, 1, 19) f[u][i] = f[f[fa][i-1]][i-1];
		for(auto v : e[u]) if(v != fa) dfs(v, u);
	}
	inline int lca(int u, int v) {
		if(dep[u] < dep[v]) swap(u, v);
		foR(i, 19, 0) if(dep[f[u][i]] >= dep[v]) u = f[u][i];
//		cerr << dep[u] << ' ' << dep[v]<< endl;
		if(u == v) return u;
		foR(i, 19, 0)
			if(f[u][i] != f[v][i]) u = f[u][i], v = f[v][i];
		return f[u][0];
	}
	void check(int u, int fa) {
		for(auto v : e[u]) {
			if(v == fa) continue;
			check(v, u);
			s1[u] += s1[v], s2[u] += s2[v];
		}
//		cerr << u << ' ' << s1[u] << ' ' << s2[u] << endl;
		if(dep[u] != 1 && s1[u] && s2[u]) {
			ok = 0;
			if(q == 10000) {
				printf("%d %d %d\n", u, s1[u], s2[u]);
				exit(0);
			}
		}
//		cerr << u << endl;
//		assert(s1[u] >= 0);assert(s2[u] >= 0);
	}
	bool solve() {
		For(i, 1, n) if(!f[i][0]) dfs(i, i);
		For(i, 1, q) {
			if(f[s[i]][19] != f[t[i]][19]) {
				if(q == 10000) printf("%d\n", 1000000);
				return 0;
			}
		}
		For(i, 1, q) {
			int u = s[i], v = t[i], l = lca(u, v);
//			cerr << u << ' ' << v << ' ' << l << endl;
			s1[u]++, s1[l]--; s2[v]++, s2[l]--;
			if(q == 10000) {
				assert(u == l || u == l);
			}
		}
//		cerr << endl;
		For(i, 1, n) {
			if(dep[i] == 1) check(i, i);
		}
		return ok;
	}

}T;
struct Graph {
	int n, m, bel[MAXN];
	map < Pair, int > cnt;
	vector < int > e[MAXN];
	int dfn[MAXN], low[MAXN], ind = 0, S[MAXN], top = 0, vis[MAXN<<1];
	void tarjan(int u, int fa) {
		dfn[u] = low[u] = ++ind; S[++top] = u;
		for(auto v : e[u]) {
			if(v == fa && cnt[mkp(u, v)] == 1) continue;
			if(dfn[v]) {
				low[u] = min(low[u], dfn[v]);
			} else {
				tarjan(v, u);
				low[u] = min(low[u], low[v]);
			}
		}
		if(low[u] == dfn[u]) {
//			cerr << u << endl;
			++T.n;
			while(S[top] != u)
				bel[S[top--]] = T.n;
			bel[S[top--]] = T.n;
		}
	}
	void init() {
		FI(n); FI(m); FI(q);
		while(m--) {
			int u = 0, v = 0; FI(u); FI(v);
			e[u].pb(v); e[v].pb(u); cnt[mkp(u, v)]++, cnt[mkp(v, u)]++;
		}
		For(i, 1, n) if(!dfn[i]) tarjan(i, 0);
//		For(i, 1, n) cerr << bel[i] << endl;
//		cerr << endl;
		For(u, 1, n) {
			for(auto v : e[u])
				if(bel[u] != bel[v]) T.addedge(bel[u], bel[v]);
		}
		For(i, 1, q) {
			FI(s[i]); FI(t[i]);
			s[i] = bel[s[i]], t[i] = bel[t[i]];
//			cerr << i << ' ' << s[i] << ' ' << t[i] << '*' << endl;
			if(s[i] == t[i]) i--, q--;
		}
//		For(i, 1, q) cerr << s[i] <<endl;
	}
}G;

signed main()
{
//	#ifndef ONLINE_JUDGE
//		file("pro");
//	#endif
	G.init();
//	For(i, 1, q) cerr << s[i] << endl;
	printf(T.solve() ? "Yes\n" : "No\n");
    return FastIO::Fflush(), 0;
}
/*

*/


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mkp make_pair
#define rint register int
#define INF ((1 << 30) - 1)
#define FI(n) FastIO::read(n)
#define FO(n) FastIO::write(n)
#define Pair pair < int, int >
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(rint i = (k); i >= (j); i--)
#define For(i, k, j) for(rint i = (k); i <= (j); i++)
#define Foe(i, u) for(rint i = lst[u], v = e[i].v; i; i = e[i].nxt, v = e[i].v)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define file(s) freopen(s".in", "r", stdin); freopen(s".out", "w", stdout)
//#define int long long
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void mulmod(int &a, int b) {a = 1ll * a * b % P;}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
namespace FastIO {
    const int SIZE=1<<16; char buf[SIZE], obuf[SIZE], str[64]; int bi=SIZE, bn=SIZE, opt;
    int read(char *s) {
        while (bn) {for (;bi<bn&&buf[bi]<=' ';bi++);if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}
        int sn=0;while (bn) {for (;bi<bn&&buf[bi]>' ';bi++) s[sn++]=buf[bi];if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}s[sn]=0;return sn;
    }
    bool read(int& x) {if(x)x=0;int bf=0,n=read(str); if(!n)return 0; int i=0; if (str[i]=='-') bf=1,i=1; for(x=0;i<n;i++) x=x*10+str[i]-'0'; if(bf) x=-x; return 1;}
    void write(int x) {
        if(!x) obuf[opt++] = '0'; else {if(x<0) obuf[opt++]='-',x=-x;int sn=0; while(x)str[sn++]=x%10+'0',x/=10;for (int i=sn-1;i>=0;i--) obuf[opt++]=str[i];}
        if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}
    }
    void write(char x) {obuf[opt++]=x;if (opt>=(SIZE>>1)){fwrite(obuf, 1, opt, stdout); opt=0;}}
    void Fflush() { if (opt) fwrite(obuf, 1, opt, stdout); opt=0;}
};
const int MAXN = 2e5 + 5;
int q, s[MAXN], t[MAXN];
struct Tree {
	int n, s1[MAXN], s2[MAXN], f[MAXN][20], ok = 1, dep[MAXN];
	vector < int > e[MAXN];
	void addedge(int u, int v) {e[u].pb(v);}
	void dfs(int u, int fa) {
		dep[u] = dep[fa] + 1;
		f[u][0] = fa; For(i, 1, 19) f[u][i] = f[f[fa][i-1]][i-1];
		for(auto v : e[u]) if(v != fa) dfs(v, u);
	}
	inline int lca(int u, int v) {
		if(dep[u] < dep[v]) swap(u, v);
		foR(i, 19, 0) if(dep[f[u][i]] >= dep[v]) u = f[u][i];
//		cerr << dep[u] << ' ' << dep[v]<< endl;
		if(u == v) return u;
		foR(i, 19, 0)
			if(f[u][i] != f[v][i]) u = f[u][i], v = f[v][i];
		return f[u][0];
	}
	void check(int u, int fa) {
		for(auto v : e[u]) {
			if(v == fa) continue;
			check(v, u);
			s1[u] += s1[v], s2[u] += s2[v];
		}
//		cerr << u << ' ' << s1[u] << ' ' << s2[u] << endl;
		if(dep[u] != 1 && s1[u] && s2[u]) ok = 0;
//		cerr << u << endl;
		assert(s1[u] >= 0); assert(s2[u] >= 0);
	}
	bool solve() {
		For(i, 1, n) if(!f[i][0]) dfs(i, i);
		For(i, 1, q) {
			if(f[s[i]][19] != f[t[i]][19]) return 0;
		}
		For(i, 1, q) {
			int u = s[i], v = t[i], l = lca(u, v);
//			cerr << u << ' ' << v << ' ' << l << endl;
			s1[u]++, s1[l]--; s2[v]++, s2[l]--;
		}
//		cerr << endl;
		For(i, 1, n) {
			if(dep[i] == 1) {
				assert(f[i][0] == i); check(i, i);
			}
		}
		return ok;
	}

}T;
struct Graph {
	int n, m, bel[MAXN];
	map < Pair, int > cnt;
	vector < int > e[MAXN];
	int dfn[MAXN], low[MAXN], ind = 0, S[MAXN], top = 0, vis[MAXN<<1];
	void tarjan(int u, int fa) {
		dfn[u] = low[u] = ++ind; S[++top] = u;
		for(auto v : e[u]) {
			if(v == fa && cnt[mkp(u, v)] == 1) continue;
			if(dfn[v]) {
				low[u] = min(low[u], dfn[v]);
			} else {
				tarjan(v, u);
				low[u] = min(low[u], low[v]);
			}
		}
		if(low[u] == dfn[u]) {
//			cerr << u << endl;
			++T.n;
			while(S[top] != u)
				bel[S[top--]] = T.n;
			bel[S[top--]] = T.n;
		}
	}
	void init() {
		FI(n); FI(m); FI(q);
		while(m--) {
			int u = 0, v = 0; FI(u); FI(v);
			e[u].pb(v); e[v].pb(u); cnt[mkp(u, v)]++, cnt[mkp(v, u)]++;
		}
		For(i, 1, n) if(!dfn[i]) tarjan(i, 0);
//		For(i, 1, n) cerr << bel[i] << endl;
//		cerr << endl;
		For(u, 1, n) {
			for(auto v : e[u])
				if(bel[u] != bel[v]) T.addedge(bel[u], bel[v]);
		}
		For(i, 1, q) {
			FI(s[i]); FI(t[i]);
			s[i] = bel[s[i]], t[i] = bel[t[i]];
//			cerr << i << ' ' << s[i] << ' ' << t[i] << '*' << endl;
			if(s[i] == t[i]) i--, q--;
		}
//		For(i, 1, q) cerr << s[i] <<endl;
	}
}G;

signed main()
{
	#ifndef ONLINE_JUDGE
		file("pro");
	#endif
	G.init();
//	For(i, 1, q) cerr << s[i] << endl;
	printf(T.solve() ? "Yes\n" : "No\n");
    return FastIO::Fflush(), 0;
}
/*

*/