#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <stack>
using namespace std;
const int MaxN = 200003;
typedef vector<int> vec;
typedef vec::iterator iter;
int n,m,q;
vec e[MaxN],g[MaxN];

int low[MaxN],dfn[MaxN],tarjan_index;
bool visited[MaxN],instk[MaxN];
stack<int> stk;
int blocks,b[MaxN];
void tarjan(int x,int father) {
    low[x]=dfn[x]=++tarjan_index;
    visited[x]=true;
    stk.push(x);instk[x]=true;
    bool flag=true;
    for (iter i=e[x].begin();i!=e[x].end();i++) {
        if (flag && *i==father) {
            flag=false;
            continue;
        }
        if (!visited[*i]) {
            tarjan(*i,x);
            low[x]=min(low[x],low[*i]);
        } else if (instk[*i])
            low[x]=min(low[x],dfn[*i]);
    }
    if (low[x]==dfn[x]) {
        blocks++;
        int t;
        do {
            t=stk.top();stk.pop();
            instk[t]=false;
            b[t]=blocks;
        } while (t!=x);
    }
}

int fa[MaxN],sz[MaxN],dep[MaxN],head[MaxN],id[MaxN],tnum[MaxN];
void build(int x) {
    sz[x]=1;
    for (iter i=g[x].begin();i!=g[x].end();i++) {
        if (*i==fa[x]) continue;
        fa[*i]=x;
        dep[*i]=dep[x]+1;
        tnum[*i]=tnum[x];
        build(*i);
        sz[x]+=sz[*i];
    }
}

int partid;
void part(int x) {
    id[x]=++partid;
    int p=-1;
    if (head[x]==0) head[x]=x;
    for (iter i=g[x].begin();i!=g[x].end();i++) {
        if (*i==fa[x]) continue;
        if (p==-1 || sz[*i]>sz[p]) p=*i;
    }
    if (p==-1) return;
    head[p]=head[x];
    part(p);
    for (iter i=g[x].begin();i!=g[x].end();i++) {
        if (*i==fa[x] || *i==p) continue;
        part(*i);
    }
}

bool up[MaxN << 2],down[MaxN << 2];
void cover(bool* s,int p,int l,int r,const int& ll,const int& rr) {
    if (ll<=l && r<=rr) s[p]=true;
    if (s[p]) return;
    int mid=(l+r)/2;
    if (ll<=mid) cover(s,p*2,l,mid,ll,rr); if (rr>mid) cover(s,p*2+1,mid+1,r,ll,rr);
}
inline void cover(bool* s,int l,int r) { cover(s,1,1,blocks,l,r); }

inline bool getx(bool* s,int x) {
    int p=1,l=1,r=blocks,mid;
    while (l<r) {
        if (s[p]) return true;
        mid=(l+r)/2;
        if (x<=mid) {
            p*=2;
            r=mid;
        }
        else {
            p=p*2+1;
            l=mid+1;
        }
    }
    return s[p];
}

inline void deal(int u,int v) {
    int t;
    while (u!=v) {
        if (head[u]==head[v]) {
            if (dep[u]<dep[v]) cover(down,id[u]+1,id[v]);
            else cover(up,id[v]+1,id[u]);
            u=v;
            break;
        }
        if (dep[u]<dep[v]) {
            t=head[v];
            if (fa[t]==t) cover(down,id[t]+1,id[v]);
            else cover(down,id[t],id[v]);
            v=fa[t];
        } else {
            t=head[u];
            if (fa[t]==t) cover(up,id[t]+1,id[u]);
            else cover(up,id[t],id[u]);
            u=fa[t];
        }
    }
}

int main() {
    //freopen("555E.in","r",stdin);
    //freopen("555E.out","w",stdout);
    scanf("%d%d%d",&n,&m,&q);
    int u,v;
    for (int i=1;i<=m;i++) {
        scanf("%d%d",&u,&v);
        e[u].push_back(v);
        e[v].push_back(u);
    }
    for (int i=1;i<=n;i++)
        if (!visited[i])
            tarjan(i,i);
    for (int i=1;i<=n;i++)
        for (iter j=e[i].begin();j!=e[i].end();j++)
            if (b[i]!=b[*j]) {
                g[b[i]].push_back(b[*j]);
                g[b[*j]].push_back(b[i]);
            }
    for (int i=1;i<=blocks;i++) {
        sort(g[i].begin(),g[i].end());
        g[i].erase(unique(g[i].begin(),g[i].end()),g[i].end());
    }
    int cnt=0;
    for (int i=1;i<=blocks;i++)
        if (tnum[i]==0) {
            tnum[i]=++cnt;
            dep[i]=1;
            fa[i]=i;
            build(i);
            part(i);
        }
    for (int i=1;i<=q;i++) {
        scanf("%d%d",&u,&v);
        if (tnum[b[u]]!=tnum[b[v]]) goto fail;
        deal(b[u],b[v]);
    }
    for (int i=1;i<=blocks;i++)
        if (getx(up,i) && getx(down,i)) goto fail;
    printf("Yes\n");
    return 0;
    fail:
    printf("No\n");
    return 0;
}


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

#define fru(j,n) for(int j=0; j<(n); ++j)
#define tr(it,v) for(typeof((v).begin()) it=(v).begin(); it!=(v).end(); ++it)
#define x first
#define y second
#define pb push_back
#define ALL(G) (G).begin(),(G).end()

typedef long long ll;
typedef double D;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;

const int inft = 1000000009;
const int MAXN = 1000006;//10^6
namespace LOW{
	struct Edge { // PRE: musi być bcc = -1 i bridge = 0 (konstruktor ustawia)
		Edge* rev;
		int dest;
		int bcc;        // OUT: Numer komponentu
		bool bridge;    // OUT: Czy most	// M
		Edge(int v) : dest(v), bcc(-1)
					  , bridge(0)	// M
		{};
	};
	int n;                     //IN: Liczba wierzchołków

	list<Edge> adj[MAXN];      // KONIECZNIE LISTY a nie vectory!!!

	void add_edge (int a, int b) {//IN: Do dodawania krawedzi
		adj[a].pb(Edge(b));   adj[b].pb(Edge(a));
		adj[a].back().rev = &adj[b].back();
		adj[b].back().rev = &adj[a].back();
	}

	int tin[MAXN];
	bool artp[MAXN];  // OUT: czy dany wierzchołek jest p.art.      // A
	int bcc_num;      // OUT: Liczba komponentów                    // D
	int low[MAXN];    // OUT: Funkcja low                           // L
	stack<Edge*> st;                                                // D
	vector<int> V[MAXN];											// SCCT
	vector<pii> bridges;											// SCCT
	int bcc[MAXN];													// SCCT
	int dfsTime;
	int bccDFS (int u, bool root = 0) {
		int lo = tin[u] = ++dfsTime;
		tr(it,adj[u]) {
			if (it->bcc != -1) continue;
			st.push(&*it);                                  // D
			it->rev->bcc = -2;
			if (!tin[it->dest]) {
				int on = bccDFS(it->dest);
				lo = min(on, lo);
				it->bridge = it->rev->bridge = (on > tin[u]);    // M
				if (on >= tin[u]) {					// AD
					bool valid=!it->bridge;					 // SCCT
					artp[u] = !root; root = 0;               // A
					Edge* edge;                              // D
					do {                                     // D
						edge = st.top(); st.pop();       // D
						edge->bcc=edge->rev->bcc=bcc_num;// D
						if(valid)bcc[edge->dest]=				// SCCT
							bcc[edge->rev->dest]=bcc_num;
					} while (edge != &*it);                  // D
					if(!valid){
						++bcc_num;					// D SCCT
						bridges.pb(pii(edge->dest,edge->rev->dest)); // SCCT
					}
				}                                                // AD
			} else lo = min(lo, tin[it->dest]);
		}
		low[u] = lo;                                                // L
		return lo;
	}
	void computeBCC(){ //to trzeba odpalic po dodaniu wszystkich krawedzi
		fill(artp, artp+n+1, 0);                                    // A
		fill(tin, tin+n+1, 0);
		fill(bcc,bcc+n+1,-1);										//SCCT
		dfsTime = 1;
		bcc_num = 0;                                                // D
		fru(i,n) if(!tin[i]) bccDFS(i, 1);
		bcc_num++;
		fru(i,n)if(bcc[i]==-1)bcc[i]=bcc_num++;						//SCCT
		tr(it,bridges){
		//	printf("most %d %d\n",bcc[it->x],bcc[it->y]);
			V[bcc[it->x]].pb(bcc[it->y]);
			V[bcc[it->y]].pb(bcc[it->x]);
		}
	}//UWAGA::trzeba pamietac o krawedziach wielokrotnych, ktore nie sa mostami
}
namespace LCAO
{
	const int N=MAXN,P=MAXN;
	vi kraw[N];
	vector<pii> pytania[N];
	int odpowiedzi[P];
	int kolor[N],fu[N],przodek[N];
	int fufind(int x){ return fu[x]<0?x:fu[x]=fufind(fu[x]); }

	//wywolujemy DfsTarjan(wierzcholek,-1);
	//zapytania umieszczamy w zmiennej pytania;
	//zakladam, ze pytamy o 2 rozne wierzcholki
	void DfsTarjan(int x,int parent){
		kolor[x]=1; fu[x]=-1; przodek[x]=x;
		tr(it,kraw[x]) if (*it!=parent){
			DfsTarjan(*it,x);
			int a=fufind(x),b=fufind(*it);
			if (fu[a]<fu[b]) swap(a,b);
			fu[b]+=fu[a]; fu[a]=b;
			przodek[b]=x;
		}
		tr(it,pytania[x]) if (kolor[it->x]==2){
			int lca=przodek[fufind(it->x)];
			odpowiedzi[it->y]=lca;
		}
		kolor[x]=2;
	}
	void DfsTarjan(){
		fru(i,N)if(kolor[i]==0)DfsTarjan(i,-1);
	}
	void dodaj_krawedz(int a,int b){
	//	printf("mam %d %d\n",a,b);
		kraw[a].push_back(b);
		kraw[b].push_back(a);
	}
	int nr=0;
	void dodaj_pytanie(int a,int b){
		if(a==b)odpowiedzi[nr]=a;
		else
		{
			pytania[a].push_back(pii(b,nr));
			pytania[b].push_back(pii(a,nr));
		}
		nr++;
	}
	void czysc(int n=N)
	{
		fru(i,n) kraw[i].clear(),pytania[i].clear(),kolor[i]=0;
		nr=0;
	}
}
int A[MAXN],B[MAXN],C[MAXN];
bool vis[MAXN];
bool dfs(int root,int skad,bool opc){
	vis[root]=1;
	bool ans=true;
	tr(it,LCAO::kraw[root])if(*it!=skad){
		ans&=dfs(*it,root,opc);
		if(opc){
			A[root]+=A[*it];
			B[root]+=B[*it];
			C[root]+=C[*it];
		}
	}
	if(A[root]>C[root] && B[root]>C[root]){
	//	printf("zle dla %d %d %d %d\n",root,A[root],B[root],C[root]);
		ans=false;;

	}
	return ans;
}
bool dfs(bool opc){
	bool ans=true;
	fru(i,LOW::bcc_num)if(!vis[i]){
		ans&=dfs(i,-1,opc);
		if(!opc)LCAO::dodaj_krawedz(i,MAXN-1);
	}
	return ans;
}
void solve() {
	int n,m,q;
	scanf("%d%d%d",&n,&m,&q);
	LOW::n=n;
	fru(i,m){
		int a,b;
		scanf("%d%d",&a,&b);
		LOW::add_edge(a-1,b-1);
	}
	LOW::computeBCC();
//	fru(i,n)printf("%d ",LOW::bcc[i]);puts("");
	fru(i,LOW::bcc_num)tr(it,LOW::V[i])if(i<*it){
		LCAO::dodaj_krawedz(i,*it);
	}
	fru(i,q){
		int a,b;
		scanf("%d%d",&a,&b);a--;b--;
		a=LOW::bcc[a];
		b=LOW::bcc[b];
		B[b]++;
//		printf("dodaje %d %d\n",a,b);
		LCAO::dodaj_pytanie(a,b);
	}
	dfs(0);
	LCAO::DfsTarjan(MAXN-1,-1);
	fru(i,q)if(LCAO::odpowiedzi[i]==MAXN-1){puts("No");return;};
	fru(i,q){C[LCAO::odpowiedzi[i]]++;if(0)printf("odp %d\n",LCAO::odpowiedzi[i]);}
	puts(dfs(MAXN-1,-1,1)?"Yes":"No");
}

int main(){
	//freopen("input.in", "r", stdin);
	//freopen("output.out", "w", stdout);
	int t=1;//scanf("%d",&t);
	fru(i,t) solve();
	return 0;
}


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

#define fru(j,n) for(int j=0; j<(n); ++j)
#define tr(it,v) for(typeof((v).begin()) it=(v).begin(); it!=(v).end(); ++it)
#define x first
#define y second
#define pb push_back
#define ALL(G) (G).begin(),(G).end()

typedef long long ll;
typedef double D;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;

const int inft = 1000000009;
const int MAXN = 200005;//10^6
namespace LOW{
	struct Edge { // PRE: musi być bcc = -1 i bridge = 0 (konstruktor ustawia)
		Edge* rev;
		int dest;
		int bcc;        // OUT: Numer komponentu
		bool bridge;    // OUT: Czy most	// M
		Edge(int v) : dest(v), bcc(-1)
					  , bridge(0)	// M
		{};
	};
	const int MAXN = 200005;  //IN: 19^6
	int n;                     //IN: Liczba wierzchołków

	list<Edge> adj[MAXN];      // KONIECZNIE LISTY a nie vectory!!!

	void add_edge (int a, int b) {//IN: Do dodawania krawedzi
		adj[a].pb(Edge(b));   adj[b].pb(Edge(a));
		adj[a].back().rev = &adj[b].back();
		adj[b].back().rev = &adj[a].back();
	}

	int tin[MAXN];
	bool artp[MAXN];  // OUT: czy dany wierzchołek jest p.art.      // A
	int bcc_num;      // OUT: Liczba komponentów                    // D
	int low[MAXN];    // OUT: Funkcja low                           // L
	stack<Edge*> st;                                                // D
	vector<int> V[MAXN];											// SCCT
	vector<pii> bridges;											// SCCT
	int bcc[MAXN];													// SCCT
	int dfsTime;
	int bccDFS (int u, bool root = 0) {
		int lo = tin[u] = ++dfsTime;
		tr(it,adj[u]) {
			if (it->bcc != -1) continue;
			st.push(&*it);                                  // D
			it->rev->bcc = -2;
			if (!tin[it->dest]) {
				int on = bccDFS(it->dest);
				lo = min(on, lo);
				it->bridge = it->rev->bridge = (on > tin[u]);    // M
				if (on >= tin[u]) {					// AD
					bool valid=!it->bridge;					 // SCCT
					artp[u] = !root; root = 0;               // A
					Edge* edge;                              // D
					do {                                     // D
						edge = st.top(); st.pop();       // D
						edge->bcc=edge->rev->bcc=bcc_num;// D
						if(valid)bcc[edge->dest]=				// SCCT
							bcc[edge->rev->dest]=bcc_num;
					} while (edge != &*it);                  // D
					if(!valid){
						++bcc_num;					// D SCCT
						bridges.pb(pii(edge->dest,edge->rev->dest)); // SCCT
					}
				}                                                // AD
			} else lo = min(lo, tin[it->dest]);
		}
		low[u] = lo;                                                // L
		return lo;
	}
	void computeBCC(){ //to trzeba odpalic po dodaniu wszystkich krawedzi
		fill(artp, artp+n+1, 0);                                    // A
		fill(tin, tin+n+1, 0);
		fill(bcc,bcc+n+1,-1);										//SCCT
		dfsTime = 1;
		bcc_num = 0;                                                // D
		fru(i,n) if(!tin[i]) bccDFS(i, 1);
		bcc_num++;
		fru(i,n)if(bcc[i]==-1)bcc[i]=bcc_num++;						//SCCT
		tr(it,bridges){
		//	printf("most %d %d\n",bcc[it->x],bcc[it->y]);
			V[bcc[it->x]].pb(bcc[it->y]);
			V[bcc[it->y]].pb(bcc[it->x]);
		}
	}//UWAGA::trzeba pamietac o krawedziach wielokrotnych, ktore nie sa mostami
}
namespace LCAO
{
	const int N=200005,P=200005;
	vi kraw[N];
	vector<pii> pytania[N];
	int odpowiedzi[P];
	int kolor[N],fu[N],przodek[N];
	int fufind(int x){ return fu[x]<0?x:fu[x]=fufind(fu[x]); }

	//wywolujemy DfsTarjan(wierzcholek,-1);
	//zapytania umieszczamy w zmiennej pytania;
	//zakladam, ze pytamy o 2 rozne wierzcholki
	void DfsTarjan(int x,int parent){
		kolor[x]=1; fu[x]=-1; przodek[x]=x;
		tr(it,kraw[x]) if (*it!=parent){
			DfsTarjan(*it,x);
			int a=fufind(x),b=fufind(*it);
			if (fu[a]<fu[b]) swap(a,b);
			fu[b]+=fu[a]; fu[a]=b;
			przodek[b]=x;
		}
		tr(it,pytania[x]) if (kolor[it->x]==2){
			int lca=przodek[fufind(it->x)];
			odpowiedzi[it->y]=lca;
		}
		kolor[x]=2;
	}
	void DfsTarjan(){
		fru(i,N)if(kolor[i]==0)DfsTarjan(i,-1);
	}
	void dodaj_krawedz(int a,int b){
//		printf("mam %d %d\n",a,b);
		kraw[a].push_back(b);
		kraw[b].push_back(a);
	}
	int nr=0;
	void dodaj_pytanie(int a,int b){
		if(a==b)odpowiedzi[nr]=a;
		else
		{
			pytania[a].push_back(pii(b,nr));
			pytania[b].push_back(pii(a,nr));
		}
		nr++;
	}
	void czysc(int n=N)
	{
		fru(i,n) kraw[i].clear(),pytania[i].clear(),kolor[i]=0;
		nr=0;
	}
}
int A[MAXN],B[MAXN],C[MAXN];
bool vis[MAXN];
bool dfs(int root,int skad,bool opc){
	vis[root]=1;
	bool ans=true;
	tr(it,LCAO::kraw[root])if(*it!=skad){
		ans&=dfs(*it,root,opc);
		if(opc){
			A[root]+=A[*it];
			B[root]+=B[*it];
			C[root]+=C[*it];
		}
	}
	if(A[root]>C[root] && B[root]>C[root])ans=false;;
	return ans;
}
bool dfs(bool opc){
	bool ans=true;
	fru(i,MAXN)if(!vis[i]){
		ans&=dfs(i,-1,opc);
		if(!opc)LCAO::dodaj_krawedz(i,MAXN-1);
	}
	return ans;
}
void solve() {
	int n,m,q;
	scanf("%d%d%d",&n,&m,&q);
	LOW::n=n;
	fru(i,m){
		int a,b;
		scanf("%d%d",&a,&b);
		LOW::add_edge(a-1,b-1);
	}
	LOW::computeBCC();
//	fru(i,n)printf("%d ",LOW::bcc[i]);puts("");
	fru(i,LOW::bcc_num)tr(it,LOW::V[i])if(i<*it){
		LCAO::dodaj_krawedz(i,*it);
	}
	fru(i,q){
		int a,b;
		scanf("%d%d",&a,&b);a--;b--;
		a=LOW::bcc[a];
		b=LOW::bcc[b];
		A[a]++;
		B[b]++;
	//	printf("dodaje %d %d\n",a,b);
		LCAO::dodaj_pytanie(a,b);
	}
	dfs(0);
	LCAO::DfsTarjan(MAXN-1,-1);
	fru(i,q)if(LCAO::odpowiedzi[i]==MAXN-1){puts("No");return;};
	fru(i,q)C[LCAO::odpowiedzi[i]]++;
	puts(dfs(MAXN-1,-1,1)?"Yes":"No");
}

int main(){
	//freopen("input.in", "r", stdin);
	//freopen("output.out", "w", stdout);
	int t=1;//scanf("%d",&t);
	fru(i,t) solve();
	return 0;
}


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

#define fru(j,n) for(int j=0; j<(n); ++j)
#define tr(it,v) for(typeof((v).begin()) it=(v).begin(); it!=(v).end(); ++it)
#define x first
#define y second
#define pb push_back
#define ALL(G) (G).begin(),(G).end()

typedef long long ll;
typedef double D;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;

const int inft = 1000000009;
const int MAXN = 1000006;//10^6
namespace LOW{
	struct Edge { // PRE: musi być bcc = -1 i bridge = 0 (konstruktor ustawia)
		Edge* rev;
		int dest;
		int bcc;        // OUT: Numer komponentu
		bool bridge;    // OUT: Czy most	// M
		Edge(int v) : dest(v), bcc(-1)
					  , bridge(0)	// M
		{};
	};
	const int MAXN = 1000006;  //IN: 19^6
	int n;                     //IN: Liczba wierzchołków

	list<Edge> adj[MAXN];      // KONIECZNIE LISTY a nie vectory!!!

	void add_edge (int a, int b) {//IN: Do dodawania krawedzi
		adj[a].pb(Edge(b));   adj[b].pb(Edge(a));
		adj[a].back().rev = &adj[b].back();
		adj[b].back().rev = &adj[a].back();
	}

	int tin[MAXN];
	bool artp[MAXN];  // OUT: czy dany wierzchołek jest p.art.      // A
	int bcc_num;      // OUT: Liczba komponentów                    // D
	int low[MAXN];    // OUT: Funkcja low                           // L
	stack<Edge*> st;                                                // D
	vector<int> V[MAXN];											// SCCT
	vector<pii> bridges;											// SCCT
	int bcc[MAXN];													// SCCT
	int dfsTime;
	int bccDFS (int u, bool root = 0) {
		int lo = tin[u] = ++dfsTime;
		tr(it,adj[u]) {
			if (it->bcc != -1) continue;
			st.push(&*it);                                  // D
			it->rev->bcc = -2;
			if (!tin[it->dest]) {
				int on = bccDFS(it->dest);
				lo = min(on, lo);
				it->bridge = it->rev->bridge = (on > tin[u]);    // M
				if (on >= tin[u]) {					// AD
					bool valid=!it->bridge;					 // SCCT
					artp[u] = !root; root = 0;               // A
					Edge* edge;                              // D
					do {                                     // D
						edge = st.top(); st.pop();       // D
						edge->bcc=edge->rev->bcc=bcc_num;// D
						if(valid)bcc[edge->dest]=				// SCCT
							bcc[edge->rev->dest]=bcc_num;
					} while (edge != &*it);                  // D
					if(!valid){
						++bcc_num;					// D SCCT
						bridges.pb(pii(edge->dest,edge->rev->dest)); // SCCT
					}
				}                                                // AD
			} else lo = min(lo, tin[it->dest]);
		}
		low[u] = lo;                                                // L
		return lo;
	}
	void computeBCC(){ //to trzeba odpalic po dodaniu wszystkich krawedzi
		fill(artp, artp+n+1, 0);                                    // A
		fill(tin, tin+n+1, 0);
		fill(bcc,bcc+n+1,-1);										//SCCT
		dfsTime = 1;
		bcc_num = 0;                                                // D
		fru(i,n) if(!tin[i]) bccDFS(i, 1);
		bcc_num++;
		fru(i,n)if(bcc[i]==-1)bcc[i]=bcc_num++;						//SCCT
		tr(it,bridges){
		//	printf("most %d %d\n",bcc[it->x],bcc[it->y]);
			V[bcc[it->x]].pb(bcc[it->y]);
			V[bcc[it->y]].pb(bcc[it->x]);
		}
	}//UWAGA::trzeba pamietac o krawedziach wielokrotnych, ktore nie sa mostami
}
namespace LCAO
{
	const int N=200005,P=200005;
	vi kraw[N];
	vector<pii> pytania[N];
	int odpowiedzi[P];
	int kolor[N],fu[N],przodek[N];

	int fufind(int x){ return fu[x]<0?x:fu[x]=fufind(fu[x]); }

	//wywolujemy DfsTarjan(wierzcholek,-1);
	//zapytania umieszczamy w zmiennej pytania;
	//zakladam, ze pytamy o 2 rozne wierzcholki
	void DfsTarjan(int x,int parent){
		kolor[x]=1; fu[x]=-1; przodek[x]=x;
		tr(it,kraw[x]) if (*it!=parent){
			DfsTarjan(*it,x);
			int a=fufind(x),b=fufind(*it);
			if (fu[a]<fu[b]) swap(a,b);
			fu[b]+=fu[a]; fu[a]=b;
			przodek[b]=x;
		}
		tr(it,pytania[x]) if (kolor[it->x]==2){
			int lca=przodek[fufind(it->x)];
			odpowiedzi[it->y]=lca;
		}
		kolor[x]=2;
	}
	void dodaj_krawedz(int a,int b){
		kraw[a].push_back(b);
		kraw[b].push_back(a);
	}
	int nr=0;
	void dodaj_pytanie(int a,int b){
		if(a==b)odpowiedzi[nr]=a;
		else
		{
			pytania[a].push_back(pii(b,nr));
			pytania[b].push_back(pii(a,nr));
		}
		nr++;
	}
	void czysc(int n=N)
	{
		fru(i,n) kraw[i].clear(),pytania[i].clear(),kolor[i]=0;
		nr=0;
	}
}
int A[MAXN],B[MAXN],C[MAXN];

bool dfs(int root,int skad){
	bool ans=true;
	tr(it,LOW::V[root])if(*it!=skad){
		ans&=dfs(*it,root);
		A[root]+=A[*it];
		B[root]+=B[*it];
		C[root]+=C[*it];
	}
	if(A[root]>C[root] && B[root]>C[root])ans=false;;
	return ans;
}
void solve() {
	int n,m,q;
	scanf("%d%d%d",&n,&m,&q);
	LOW::n=n;
	fru(i,m){
		int a,b;
		scanf("%d%d",&a,&b);
		LOW::add_edge(a-1,b-1);
	}
	LOW::computeBCC();
//	fru(i,n)printf("%d ",LOW::bcc[i]);puts("");
	fru(i,LOW::bcc_num)tr(it,LOW::V[i])if(i<*it){
		LCAO::dodaj_krawedz(i,*it);
	//	printf("mam %d %d\n",i,*it);
	}
	fru(i,q){
		int a,b;
		scanf("%d%d",&a,&b);a--;b--;
		a=LOW::bcc[a];
		b=LOW::bcc[b];
		A[a]++;
		B[b]++;
	//	printf("dodaje %d %d\n",a,b);
		LCAO::dodaj_pytanie(a,b);
	}
	LCAO::DfsTarjan(LOW::bcc[0],-1);
	fru(i,q)C[LCAO::odpowiedzi[i]]++;
	puts(dfs(LOW::bcc[0],-1)?"Yes":"No");
}

int main(){
	//freopen("input.in", "r", stdin);
	//freopen("output.out", "w", stdout);
	int t=1;//scanf("%d",&t);
	fru(i,t) solve();
	return 0;
}


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

#define fru(j,n) for(int j=0; j<(n); ++j)
#define tr(it,v) for(typeof((v).begin()) it=(v).begin(); it!=(v).end(); ++it)
#define x first
#define y second
#define pb push_back
#define ALL(G) (G).begin(),(G).end()

typedef long long ll;
typedef double D;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;

const int inft = 1000000009;
const int MAXN = 1000006;//10^6
namespace LOW{
	struct Edge { // PRE: musi być bcc = -1 i bridge = 0 (konstruktor ustawia)
		Edge* rev;
		int dest;
		int bcc;        // OUT: Numer komponentu
		bool bridge;    // OUT: Czy most	// M
		Edge(int v) : dest(v), bcc(-1)
					  , bridge(0)	// M
		{};
	};
	int n;                     //IN: Liczba wierzchołków

	list<Edge> adj[MAXN];      // KONIECZNIE LISTY a nie vectory!!!

	void add_edge (int a, int b) {//IN: Do dodawania krawedzi
		adj[a].pb(Edge(b));   adj[b].pb(Edge(a));
		adj[a].back().rev = &adj[b].back();
		adj[b].back().rev = &adj[a].back();
	}

	int tin[MAXN];
	bool artp[MAXN];  // OUT: czy dany wierzchołek jest p.art.      // A
	int bcc_num;      // OUT: Liczba komponentów                    // D
	int low[MAXN];    // OUT: Funkcja low                           // L
	stack<Edge*> st;                                                // D
	vector<int> V[MAXN];											// SCCT
	vector<pii> bridges;											// SCCT
	int bcc[MAXN];													// SCCT
	int dfsTime;
	int bccDFS (int u, bool root = 0) {
		int lo = tin[u] = ++dfsTime;
		tr(it,adj[u]) {
			if (it->bcc != -1) continue;
			st.push(&*it);                                  // D
			it->rev->bcc = -2;
			if (!tin[it->dest]) {
				int on = bccDFS(it->dest);
				lo = min(on, lo);
				it->bridge = it->rev->bridge = (on > tin[u]);    // M
				if (on >= tin[u]) {					// AD
					bool valid=!it->bridge;					 // SCCT
					artp[u] = !root; root = 0;               // A
					Edge* edge;                              // D
					do {                                     // D
						edge = st.top(); st.pop();       // D
						edge->bcc=edge->rev->bcc=bcc_num;// D
						if(valid)bcc[edge->dest]=				// SCCT
							bcc[edge->rev->dest]=bcc_num;
					} while (edge != &*it);                  // D
					if(!valid){
						++bcc_num;					// D SCCT
						bridges.pb(pii(edge->dest,edge->rev->dest)); // SCCT
					}
				}                                                // AD
			} else lo = min(lo, tin[it->dest]);
		}
		low[u] = lo;                                                // L
		return lo;
	}
	void computeBCC(){ //to trzeba odpalic po dodaniu wszystkich krawedzi
		fill(artp, artp+n+1, 0);                                    // A
		fill(tin, tin+n+1, 0);
		fill(bcc,bcc+n+1,-1);										//SCCT
		dfsTime = 1;
		bcc_num = 0;                                                // D
		fru(i,n) if(!tin[i]) bccDFS(i, 1);
		bcc_num++;
		fru(i,n)if(bcc[i]==-1)bcc[i]=bcc_num++;						//SCCT
		tr(it,bridges){
		//	printf("most %d %d\n",bcc[it->x],bcc[it->y]);
			V[bcc[it->x]].pb(bcc[it->y]);
			V[bcc[it->y]].pb(bcc[it->x]);
		}
	}//UWAGA::trzeba pamietac o krawedziach wielokrotnych, ktore nie sa mostami
}
const int P=0;
namespace LCAO
{
	const int N=MAXN,PP=MAXN;
	vi kraw[N];
	vector<pii> pytania[N];
	int odpowiedzi[PP];
	int kolor[N],fu[N],przodek[N];
	int fufind(int x){ return fu[x]<0?x:fu[x]=fufind(fu[x]); }

	//wywolujemy DfsTarjan(wierzcholek,-1);
	//zapytania umieszczamy w zmiennej pytania;
	//zakladam, ze pytamy o 2 rozne wierzcholki
	void DfsTarjan(int x,int parent){
		kolor[x]=1; fu[x]=-1; przodek[x]=x;
		tr(it,kraw[x]) if (*it!=parent){
			DfsTarjan(*it,x);
			int a=fufind(x),b=fufind(*it);
			if (fu[a]<fu[b]) swap(a,b);
			fu[b]+=fu[a]; fu[a]=b;
			przodek[b]=x;
		}
		tr(it,pytania[x]) if (kolor[it->x]==2){
			int lca=przodek[fufind(it->x)];
			odpowiedzi[it->y]=lca;
		}
		kolor[x]=2;
	}
	void DfsTarjan(){
		fru(i,N)if(kolor[i]==0)DfsTarjan(i,-1);
	}
	void dodaj_krawedz(int a,int b){
	if(P)	printf("mam %d %d\n",a,b);
		kraw[a].push_back(b);
		kraw[b].push_back(a);
	}
	int nr=0;
	void dodaj_pytanie(int a,int b){
		if(a==b)odpowiedzi[nr]=a;
		else
		{
			pytania[a].push_back(pii(b,nr));
			pytania[b].push_back(pii(a,nr));
		}
		nr++;
	}
	void czysc(int n=N)
	{
		fru(i,n) kraw[i].clear(),pytania[i].clear(),kolor[i]=0;
		nr=0;
	}
}
int A[MAXN],B[MAXN],C[MAXN];
bool vis[MAXN];
bool dfs(int root,int skad,bool opc){
	vis[root]=1;
	bool ans=true;
	tr(it,LCAO::kraw[root])if(*it!=skad){
		ans&=dfs(*it,root,opc);
		if(opc){
			A[root]+=A[*it];
			B[root]+=B[*it];
			C[root]+=C[*it];
		}
	}
	if(P)	printf("wyniki dla %d %d %d %d\n",root,A[root],B[root],C[root]);
	if(A[root]>C[root] && B[root]>C[root]){
	if(P)	printf("zle dla %d %d %d %d\n",root,A[root],B[root],C[root]);
		ans=false;;

	}
	return ans;
}
bool dfs(bool opc){
	bool ans=true;
	fru(i,LOW::bcc_num)if(!vis[i]){
		ans&=dfs(i,-1,opc);
		if(!opc)LCAO::dodaj_krawedz(i,MAXN-1);
	}
	return ans;
}
void solve() {
	int n,m,q;
	scanf("%d%d%d",&n,&m,&q);
	LOW::n=n;
	fru(i,m){
		int a,b;
		scanf("%d%d",&a,&b);
		LOW::add_edge(a-1,b-1);
	}
	LOW::computeBCC();
if(P){	fru(i,n)printf("%d ",LOW::bcc[i]);puts("");}
	fru(i,LOW::bcc_num)tr(it,LOW::V[i])if(i<*it){
		LCAO::dodaj_krawedz(i,*it);
	}
	fru(i,q){
		int a,b;
		scanf("%d%d",&a,&b);a--;b--;
		a=LOW::bcc[a];
		b=LOW::bcc[b];
		A[a]++;
		B[b]++;
if(P)		printf("dodaje %d %d\n",a,b);
		LCAO::dodaj_pytanie(a,b);
	}
	dfs(0);
	LCAO::DfsTarjan(MAXN-1,-1);
	fru(i,q)if(LCAO::odpowiedzi[i]==MAXN-1){puts("No");return;};
	fru(i,q){C[LCAO::odpowiedzi[i]]++;if(P)printf("odp %d\n",LCAO::odpowiedzi[i]);}
	puts(dfs(MAXN-1,-1,1)?"Yes":"No");
}

int main(){
	//freopen("input.in", "r", stdin);
	//freopen("output.out", "w", stdout);
	int t=1;//scanf("%d",&t);
	fru(i,t) solve();
	return 0;
}


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

#define fru(j,n) for(int j=0; j<(n); ++j)
#define tr(it,v) for(typeof((v).begin()) it=(v).begin(); it!=(v).end(); ++it)
#define x first
#define y second
#define pb push_back
#define ALL(G) (G).begin(),(G).end()

typedef long long ll;
typedef double D;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;

const int inft = 1000000009;
const int MAXN = 1000006;//10^6
namespace LOW{
	struct Edge { // PRE: musi być bcc = -1 i bridge = 0 (konstruktor ustawia)
		Edge* rev;
		int dest;
		int bcc;        // OUT: Numer komponentu
		bool bridge;    // OUT: Czy most	// M
		Edge(int v) : dest(v), bcc(-1)
					  , bridge(0)	// M
		{};
	};
	const int MAXN = 1000006;  //IN: 19^6
	int n;                     //IN: Liczba wierzchołków

	list<Edge> adj[MAXN];      // KONIECZNIE LISTY a nie vectory!!!

	void add_edge (int a, int b) {//IN: Do dodawania krawedzi
		adj[a].pb(Edge(b));   adj[b].pb(Edge(a));
		adj[a].back().rev = &adj[b].back();
		adj[b].back().rev = &adj[a].back();
	}

	int tin[MAXN];
	bool artp[MAXN];  // OUT: czy dany wierzchołek jest p.art.      // A
	int bcc_num;      // OUT: Liczba komponentów                    // D
	int low[MAXN];    // OUT: Funkcja low                           // L
	stack<Edge*> st;                                                // D
	vector<int> V[MAXN];											// SCCT
	vector<pii> bridges;											// SCCT
	int bcc[MAXN];													// SCCT
	int dfsTime;
	int bccDFS (int u, bool root = 0) {
		int lo = tin[u] = ++dfsTime;
		tr(it,adj[u]) {
			if (it->bcc != -1) continue;
			st.push(&*it);                                  // D
			it->rev->bcc = -2;
			if (!tin[it->dest]) {
				int on = bccDFS(it->dest);
				lo = min(on, lo);
				it->bridge = it->rev->bridge = (on > tin[u]);    // M
				if (on >= tin[u]) {					// AD
					bool valid=!it->bridge;					 // SCCT
					artp[u] = !root; root = 0;               // A
					Edge* edge;                              // D
					do {                                     // D
						edge = st.top(); st.pop();       // D
						edge->bcc=edge->rev->bcc=bcc_num;// D
						if(valid)bcc[edge->dest]=				// SCCT
							bcc[edge->rev->dest]=bcc_num;
					} while (edge != &*it);                  // D
					if(valid)++bcc_num;					// D SCCT
					else bridges.pb(pii(edge->dest,edge->rev->dest)); // SCCT
				}                                                // AD
			} else lo = min(lo, tin[it->dest]);
		}
		low[u] = lo;                                                // L
		return lo;
	}
	void computeBCC(){ //to trzeba odpalic po dodaniu wszystkich krawedzi
		fill(artp, artp+n+1, 0);                                    // A
		fill(tin, tin+n+1, 0);
		fill(bcc,bcc+n+1,-1);										//SCCT
		dfsTime = 1;
		bcc_num = 0;                                                // D
		fru(i,n) if(!tin[i]) bccDFS(i, 1);
		fru(i,n)if(bcc[i]==-1)bcc[i]=bcc_num++;						//SCCT
		tr(it,bridges){
			V[bcc[it->x]].pb(bcc[it->y]);
			V[bcc[it->y]].pb(bcc[it->x]);
		}
	}//UWAGA::trzeba pamietac o krawedziach wielokrotnych, ktore nie sa mostami
}
namespace LCAO
{
	const int N=200005,P=200005;
	vi kraw[N];
	vector<pii> pytania[N];
	int odpowiedzi[P];
	int kolor[N],fu[N],przodek[N];

	int fufind(int x){ return fu[x]<0?x:fu[x]=fufind(fu[x]); }

	//wywolujemy DfsTarjan(wierzcholek,-1);
	//zapytania umieszczamy w zmiennej pytania;
	//zakladam, ze pytamy o 2 rozne wierzcholki
	void DfsTarjan(int x,int parent){
		kolor[x]=1; fu[x]=-1; przodek[x]=x;
		tr(it,kraw[x]) if (*it!=parent){
			DfsTarjan(*it,x);
			int a=fufind(x),b=fufind(*it);
			if (fu[a]<fu[b]) swap(a,b);
			fu[b]+=fu[a]; fu[a]=b;
			przodek[b]=x;
		}
		tr(it,pytania[x]) if (kolor[it->x]==2){
			int lca=przodek[fufind(it->x)];
			odpowiedzi[it->y]=lca;
		}
		kolor[x]=2;
	}
	void dodaj_krawedz(int a,int b){
		kraw[a].push_back(b);
		kraw[b].push_back(a);
	}
	int nr=0;
	void dodaj_pytanie(int a,int b){
		if(a==b)odpowiedzi[nr]=a;
		else
		{
			pytania[a].push_back(pii(b,nr));
			pytania[b].push_back(pii(a,nr));
		}
		nr++;
	}
	void czysc(int n=N)
	{
		fru(i,n) kraw[i].clear(),pytania[i].clear(),kolor[i]=0;
		nr=0;
	}
}
int A[MAXN],B[MAXN],C[MAXN];

bool dfs(int root,int skad){
	bool ans=true;
	tr(it,LOW::V[root])if(*it!=skad){
		ans&=dfs(*it,root);
		A[root]+=A[*it];
		B[root]+=B[*it];
		C[root]+=C[*it];
	}
	if(A[root]>C[root] && B[root]>C[root])ans=false;;
	return ans;
}
void solve() {
	int n,m,q;
	scanf("%d%d%d",&n,&m,&q);
	LOW::n=n;
	fru(i,m){
		int a,b;
		scanf("%d%d",&a,&b);
		LOW::add_edge(a-1,b-1);
	}
	LOW::computeBCC();
	fru(i,LOW::bcc_num)tr(it,LOW::V[i])if(*it<i){
		LCAO::dodaj_krawedz(i,*it);
	//	printf("mam %d %d\n",i,*it);
	}
	fru(i,q){
		int a,b;
		scanf("%d%d",&a,&b);a--;b--;
		a=LOW::bcc[a];
		b=LOW::bcc[b];
		A[a]++;
		B[b]++;
	//	printf("dodaje %d %d\n",a,b);
		LCAO::dodaj_pytanie(a,b);
	}
	LCAO::DfsTarjan(0,-1);
	fru(i,q)C[LCAO::odpowiedzi[i]]++;
	puts(dfs(0,-1)?"Yes":"No");
}

int main(){
	//freopen("input.in", "r", stdin);
	//freopen("output.out", "w", stdout);
	int t=1;//scanf("%d",&t);
	fru(i,t) solve();
	return 0;
}


#include<stdio.h>
#include<algorithm>
#define mp make_pair
#define ft first
#define sd second
using namespace std;
typedef pair<int,int> pii;
const int maxn=200050,maxm=200050,maxb=18;
int n,m,q,anss;
char ans[2][5]={"No","Yes"};
int es=1,he[maxn],ne[maxm*2],to[maxm*2];
bool whe[maxm*2];
int tim=0,dfn[maxn],low[maxn],bel[maxn],bs=0;
pii st[maxm];
int top=0;
int es2=1,he2[maxn],ne2[maxm*2],to2[maxm*2];
int fa[maxn][maxb],dep[maxn];
int len[maxn][2]; //0^ 1v
void ins(int x,int y)
{
	ne[++es]=he[x],he[x]=es,to[es]=y;
}
void dfs(int x,int fr)
{
	int i,y;
	low[x]=dfn[x]=++tim;
	for(i=he[x];i;i=ne[i])
		if(i!=fr)
		{
			if(!dfn[y=to[i]])
				dfs(y,i^1),low[x]=min(low[x],low[y]);
			else low[x]=min(low[x],dfn[y]);
		}
	//printf("%d %d %d\n",x,dfn[x],low[x]);
	if(low[x]>=dfn[x])
		whe[fr]=whe[fr^1]=1;
}
void get_b(int b,int x)
{
	int i,y;
	//printf("%d %d\n",b,x);
	bel[x]=b;
	for(i=he[x];i;i=ne[i])
		if(!whe[i]&&!bel[y=to[i]])
			get_b(b,y);
}
void ins2(int x,int y)
{
	ne2[++es2]=he2[x],he2[x]=es2,to2[es2]=y;
}
void dfs2(int x)
{
	int i,y;
	for(i=0;fa[x][i];i++)
		fa[x][i+1]=fa[fa[x][i]][i];
	for(i=he2[x];i;i=ne2[i])
		if((y=to2[i])!=fa[x][0])
			fa[y][0]=x,dep[y]=dep[x]+1,dfs2(y);
}
inline int LCA(int x,int y)
{
	if(dep[x]<dep[y]) swap(x,y);
	int i;
	for(i=maxb-1;i>=0;i--)
		if(dep[x]-dep[y]>=1<<i)
			x=fa[x][i];
	if(x==y) return x;
	for(i=maxb-1;i>=0;i--)
		if(fa[x][i]!=fa[y][i])
			x=fa[x][i],y=fa[y][i];
	return fa[x][0];
}
bool check(int x)
{
	int i,y;
	bool z=1;
	for(i=he2[x];i;i=ne2[i])
		if((y=to2[i])!=fa[x][0])
		{
			z&=check(y);
			len[x][0]=max(len[x][0],len[y][0]-1);
			len[x][1]=max(len[x][1],len[y][1]-1);
		}
	return z&(!len[x][0]||!len[x][1]);
}
int main()
{
#ifndef ONLINE_JUDGE
	freopen("data.in","r",stdin);
	freopen("data.out","w",stdout);
#endif
	int i,j,x,y;
	scanf("%d%d%d",&n,&m,&q);
	for(i=0;i<m;i++)
		scanf("%d%d",&x,&y),ins(x,y),ins(y,x);
	for(i=1;i<=n;i++)
		if(!dfn[i])
			dfs(i,0);
	for(i=1;i<=n;i++)
		if(!bel[i])
			get_b(++bs,i);
	for(i=1;i<=n;i++)
		for(j=he[i];j;j=ne[j])
			if(bel[i]!=bel[to[j]])
				ins2(bel[i],bel[to[j]]);
	for(i=1;i<=n;i++)
		dfs2(i);
	while(q--)
	{
		int lca;
		scanf("%d%d",&x,&y);
		x=bel[x],y=bel[y];
		lca=LCA(x,y);
		if(!lca) anss=0;
		len[x][0]=max(len[x][0],dep[x]-dep[lca]);
		len[y][1]=max(len[y][1],dep[y]-dep[lca]);
	}
	if(anss) anss=check(1);
	printf("%s\n",ans[anss]);
	return 0;
}


#include<stdio.h>
#include<algorithm>
#define mp make_pair
#define ft first
#define sd second
using namespace std;
typedef pair<int,int> pii;
const int maxn=200050,maxm=200050;
int n,m,q,anss=1;
char ans[2][5]={"No","Yes"};
int es=1,he[maxn],ne[maxm*2],to[maxm*2];
bool whe[maxm*2];
int tim=0,dfn[maxn],low[maxn],bel[maxn],bs=0;
pii st[maxm];
int top=0;
int es2=1,he2[maxn],ne2[maxm*2],to2[maxm*2];
int fa[maxn],dep[maxn];
int dir[maxn]; //1^ 2v
void ins(int x,int y)
{
	ne[++es]=he[x],he[x]=es,to[es]=y;
}
void dfs(int x,int fr)
{
	int i,y;
	low[x]=dfn[x]=++tim;
	for(i=he[x];i;i=ne[i])
		if(i!=fr)
		{
			if(!dfn[y=to[i]])
				dfs(y,i^1),low[x]=min(low[x],low[y]);
			else low[x]=min(low[x],dfn[y]);
		}
	//printf("%d %d %d\n",x,dfn[x],low[x]);
	if(low[x]>=dfn[x])
		whe[fr]=whe[fr^1]=1;
}
void get_b(int b,int x)
{
	int i,y;
	//printf("%d %d\n",b,x);
	bel[x]=b;
	for(i=he[x];i;i=ne[i])
		if(!whe[i]&&!bel[y=to[i]])
			get_b(b,y);
}
void ins2(int x,int y)
{
	ne2[++es2]=he2[x],he2[x]=es2,to2[es2]=y;
}
void dfs2(int x)
{
	int i,y;
	for(i=he2[x];i;i=ne2[i])
		if(!fa[y=to2[i]])
			fa[y]=x,dep[y]=dep[x]+1,dfs2(y);
}
bool cover(int x,int y)
{
	while(dep[x]>dep[y])
	{
		if(dir[x]&&dir[x]!=1) return 0;
		dir[x]=1;
		x=fa[x];
	}
	while(dep[y]>dep[x])
	{
		if(dir[y]&&dir[y]!=2) return 0;
		dir[y]=2;
		y=fa[y];
	}
	while(x!=y)
	{
		if((dir[x]&&dir[x]!=1)||(dir[y]&&dir[y]!=2))
			return 0;
		dir[x]=1;
		dir[y]=2;
		x=fa[x],y=fa[y];
	}
	return 1;
}
int main()
{
#ifndef ONLINE_JUDGE
	freopen("data.in","r",stdin);
	freopen("data.out","w",stdout);
#endif
	int i,j,x,y;
	scanf("%d%d%d",&n,&m,&q);
	for(i=0;i<m;i++)
		scanf("%d%d",&x,&y),ins(x,y),ins(y,x);
	for(i=1;i<=n;i++)
		if(!dfn[i])
			dfs(i,0);
	for(i=1;i<=n;i++)
		if(!bel[i])
			get_b(++bs,i);
	for(i=1;i<=n;i++)
		for(j=he[i];j;j=ne[j])
			if(bel[i]!=bel[to[j]])
				ins2(bel[i],bel[to[j]]);
	for(i=1;i<=n;i++)
		if(!fa[i])
			dfs2(i);
	while(q--)
	{
		scanf("%d%d",&x,&y);
		anss&=cover(bel[x],bel[y]);
	}
	printf("%s\n",ans[anss]);
	return 0;
}


#include<stdio.h>
#include<algorithm>
#define mp make_pair
#define ft first
#define sd second
using namespace std;
typedef pair<int,int> pii;
const int maxn=200050,maxm=200050,maxb=18;
int n,m,q,anss=1;
char ans[2][5]={"No","Yes"};
int es=1,he[maxn],ne[maxm*2],to[maxm*2];
bool whe[maxm*2];
int tim=0,dfn[maxn],low[maxn],bel[maxn],bs=0;
pii st[maxm];
int top=0;
int es2=1,he2[maxn],ne2[maxm*2],to2[maxm*2];
int fa[maxn][maxb],dep[maxn];
int len[maxn][2]; //0^ 1v
void ins(int x,int y)
{
	ne[++es]=he[x],he[x]=es,to[es]=y;
}
void dfs(int x,int fr)
{
	int i,y;
	low[x]=dfn[x]=++tim;
	for(i=he[x];i;i=ne[i])
		if(i!=fr)
		{
			if(!dfn[y=to[i]])
				dfs(y,i^1),low[x]=min(low[x],low[y]);
			else low[x]=min(low[x],dfn[y]);
		}
	//printf("%d %d %d\n",x,dfn[x],low[x]);
	if(low[x]>=dfn[x])
		whe[fr]=whe[fr^1]=1;
}
void get_b(int b,int x)
{
	int i,y;
	//printf("%d %d\n",b,x);
	bel[x]=b;
	for(i=he[x];i;i=ne[i])
		if(!whe[i]&&!bel[y=to[i]])
			get_b(b,y);
}
void ins2(int x,int y)
{
	ne2[++es2]=he2[x],he2[x]=es2,to2[es2]=y;
}
void dfs2(int x)
{
	int i,y;
	for(i=0;fa[x][i];i++)
		fa[x][i+1]=fa[fa[x][i]][i];
	for(i=he2[x];i;i=ne2[i])
		if((y=to2[i])!=fa[x][0])
			fa[y][0]=x,dep[y]=dep[x]+1,dfs2(y);
}
inline int LCA(int x,int y)
{
	if(dep[x]<dep[y]) swap(x,y);
	int i;
	for(i=maxb-1;i>=0;i--)
		if(dep[x]-dep[y]>=1<<i)
			x=fa[x][i];
	if(x==y) return x;
	for(i=maxb-1;i>=0;i--)
		if(fa[x][i]!=fa[y][i])
			x=fa[x][i],y=fa[y][i];
	return fa[x][0];
}
bool check(int x)
{
	int i,y;
	bool z=1;
	for(i=he2[x];i;i=ne2[i])
		if((y=to2[i])!=fa[x][0])
		{
			z&=check(y);
			len[x][0]=max(len[x][0],len[y][0]-1);
			len[x][1]=max(len[x][1],len[y][1]-1);
		}
	return z&(!len[x][0]||!len[x][1]);
}
int main()
{
#ifndef ONLINE_JUDGE
	freopen("data.in","r",stdin);
	freopen("data.out","w",stdout);
#endif
	int i,j,x,y;
	scanf("%d%d%d",&n,&m,&q);
	for(i=0;i<m;i++)
		scanf("%d%d",&x,&y),ins(x,y),ins(y,x);
	for(i=1;i<=n;i++)
		if(!dfn[i])
			dfs(i,0);
	for(i=1;i<=n;i++)
		if(!bel[i])
			get_b(++bs,i);
	for(i=1;i<=n;i++)
		for(j=he[i];j;j=ne[j])
			if(bel[i]!=bel[to[j]])
				ins2(bel[i],bel[to[j]]);
	for(i=1;i<=n;i++)
		if(!fa[i][0])
			dfs2(i);
	while(q--)
	{
		int lca;
		scanf("%d%d",&x,&y);
		x=bel[x],y=bel[y];
		lca=LCA(x,y);
		if(!lca) anss=0;
		len[x][0]=max(len[x][0],dep[x]-dep[lca]);
		len[y][1]=max(len[y][1],dep[y]-dep[lca]);
	}
	if(anss) anss=check(1);
	printf("%s\n",ans[anss]);
	return 0;
}


#include<stdio.h>
#include<algorithm>
#define mp make_pair
#define ft first
#define sd second
using namespace std;
typedef pair<int,int> pii;
const int maxn=200050,maxm=200050;
int n,m,q,anss=1;
char ans[2][5]={"No","Yes"};
int es=1,he[maxn],ne[maxm*2],to[maxm*2];
bool whe[maxm*2];
int tim=0,dfn[maxn],low[maxn],bel[maxn],bs=0;
pii st[maxm];
int top=0;
int es2=1,he2[maxn],ne2[maxm*2],to2[maxm*2];
int fa[maxn],dep[maxn];
int dir[maxn]; //1^ 2v
void ins(int x,int y)
{
	ne[++es]=he[x],he[x]=es,to[es]=y;
}
void dfs(int x,int fr)
{
	int i,y;
	low[x]=dfn[x]=++tim;
	for(i=he[x];i;i=ne[i])
		if(i!=fr)
		{
			if(!dfn[y=to[i]])
				dfs(y,i^1),low[x]=min(low[x],low[y]);
			else low[x]=min(low[x],dfn[y]);
		}
	if(low[x]>=dfn[x])
		whe[fr]=whe[fr^1]=1;
}
void get_b(int b,int x)
{
	int i,y;
	//printf("%d %d\n",b,x);
	bel[x]=b;
	for(i=he[x];i;i=ne[i])
		if(!whe[i]&&!bel[y=to[i]])
			get_b(b,y);
}
void ins2(int x,int y)
{
	ne2[++es2]=he2[x],he2[x]=es2,to2[es2]=y;
}
void dfs2(int x)
{
	int i,y;
	for(i=he2[x];i;i=ne2[i])
		if(!fa[y=to2[i]])
			fa[y]=x,dep[y]=dep[x]+1,dfs2(y);
}
bool cover(int x,int y)
{
	while(dep[x]>dep[y])
	{
		if(dir[x]&&dir[x]!=1) return 0;
		dir[x]=1;
		x=fa[x];
	}
	while(dep[y]>dep[x])
	{
		if(dir[y]&&dir[y]!=2) return 0;
		dir[y]=2;
		y=fa[y];
	}
	while(x!=y)
	{
		if((dir[x]&&dir[x]!=1)||(dir[y]&&dir[y]!=2))
			return 0;
		dir[x]=1;
		dir[y]=2;
		x=fa[x],y=fa[y];
	}
	return 1;
}
int main()
{
#ifndef ONLINE_JUDGE
	freopen("data.in","r",stdin);
#endif
	int i,j,x,y;
	scanf("%d%d%d",&n,&m,&q);
	for(i=0;i<m;i++)
		scanf("%d%d",&x,&y),ins(x,y),ins(y,x);
	for(i=1;i<=n;i++)
		dfs(x,0);
	for(i=1;i<=n;i++)
		if(!bel[i])
			get_b(++bs,i);
	for(i=1;i<=n;i++)
		for(j=he[x];j;j=ne[j])
			if(bel[i]!=bel[to[j]])
				ins2(bel[i],bel[to[j]]),ins2(bel[i],bel[to[j]]);
	for(i=1;i<=n;i++)
		if(!fa[i])
			dfs2(x);
	while(q--)
	{
		scanf("%d%d",&x,&y);
		anss&=cover(bel[x],bel[y]);
	}
	printf("%s\n",ans[anss]);
	return 0;
}


#include<stdio.h>
#include<algorithm>
#define mp make_pair
#define ft first
#define sd second
using namespace std;
typedef pair<int,int> pii;
const int maxn=200050,maxm=200050,maxb=18;
int n,m,q,anss;
char ans[2][5]={"No","Yes"};
int es=1,he[maxn],ne[maxm*2],to[maxm*2];
bool whe[maxm*2];
int tim=0,dfn[maxn],low[maxn],bel[maxn],bs=0;
pii st[maxm];
int top=0;
int es2=1,he2[maxn],ne2[maxm*2],to2[maxm*2];
int fa[maxn][maxb],dep[maxn];
int len[maxn][2]; //0^ 1v
void ins(int x,int y)
{
	ne[++es]=he[x],he[x]=es,to[es]=y;
}
void dfs(int x,int fr)
{
	int i,y;
	low[x]=dfn[x]=++tim;
	for(i=he[x];i;i=ne[i])
		if(i!=fr)
		{
			if(!dfn[y=to[i]])
				dfs(y,i^1),low[x]=min(low[x],low[y]);
			else low[x]=min(low[x],dfn[y]);
		}
	//printf("%d %d %d\n",x,dfn[x],low[x]);
	if(low[x]>=dfn[x])
		whe[fr]=whe[fr^1]=1;
}
void get_b(int b,int x)
{
	int i,y;
	//printf("%d %d\n",b,x);
	bel[x]=b;
	for(i=he[x];i;i=ne[i])
		if(!whe[i]&&!bel[y=to[i]])
			get_b(b,y);
}
void ins2(int x,int y)
{
	ne2[++es2]=he2[x],he2[x]=es2,to2[es2]=y;
}
void dfs2(int x)
{
	int i,y;
	for(i=0;fa[x][i];i++)
		fa[x][i+1]=fa[fa[x][i]][i];
	for(i=he2[x];i;i=ne2[i])
		if((y=to2[i])!=fa[x][0])
			fa[y][0]=x,dep[y]=dep[x]+1,dfs2(y);
}
inline int LCA(int x,int y)
{
	if(dep[x]<dep[y]) swap(x,y);
	int i;
	for(i=maxb-1;i>=0;i--)
		if(dep[x]-dep[y]>=1<<i)
			x=fa[x][i];
	if(x==y) return x;
	for(i=maxb-1;i>=0;i--)
		if(fa[x][i]!=fa[y][i])
			x=fa[x][i],y=fa[y][i];
	return fa[x][0];
}
bool check(int x)
{
	int i,y;
	bool z=1;
	for(i=he2[x];i;i=ne2[i])
		if((y=to2[i])!=fa[x][0])
		{
			z&=check(y);
			len[x][0]=max(len[x][0],len[y][0]-1);
			len[x][1]=max(len[x][1],len[y][1]-1);
		}
	return z&(!len[x][0]||!len[x][1]);
}
int main()
{
#ifndef ONLINE_JUDGE
	freopen("data.in","r",stdin);
	freopen("data.out","w",stdout);
#endif
	int i,j,x,y;
	scanf("%d%d%d",&n,&m,&q);
	for(i=0;i<m;i++)
		scanf("%d%d",&x,&y),ins(x,y),ins(y,x);
	dfs(1,0);
	for(i=1;i<=n;i++)
		if(!bel[i])
			get_b(++bs,i);
	for(i=1;i<=n;i++)
		for(j=he[i];j;j=ne[j])
			if(bel[i]!=bel[to[j]])
				ins2(bel[i],bel[to[j]]);
	dfs2(1);
	while(q--)
	{
		int lca;
		scanf("%d%d",&x,&y);
		lca=LCA(bel[x],bel[y]);
		len[x][0]=max(len[x][0],dep[x]-dep[lca]);
		len[y][1]=max(len[y][1],dep[y]-dep[lca]);
	}
	anss=check(1);
	printf("%s\n",ans[anss]);
	return 0;
}


#include<stdio.h>
#include<algorithm>
#define mp make_pair
#define ft first
#define sd second
using namespace std;
typedef pair<int,int> pii;
const int maxn=200050,maxm=200050,maxb=18;
int n,m,q,anss=1;
char ans[2][5]={"No","Yes"};
int es=1,he[maxn],ne[maxm*2],to[maxm*2];
bool whe[maxm*2];
int tim=0,dfn[maxn],low[maxn],bel[maxn],bs=0;
pii st[maxm];
int top=0;
int es2=1,he2[maxn],ne2[maxm*2],to2[maxm*2];
int fa[maxn][maxb],dep[maxn];
int len[maxn][2]; //0^ 1v
void ins(int x,int y)
{
	ne[++es]=he[x],he[x]=es,to[es]=y;
}
void dfs(int x,int fr)
{
	int i,y;
	low[x]=dfn[x]=++tim;
	for(i=he[x];i;i=ne[i])
		if(i!=fr)
		{
			if(!dfn[y=to[i]])
				dfs(y,i^1),low[x]=min(low[x],low[y]);
			else low[x]=min(low[x],dfn[y]);
		}
	//printf("%d %d %d\n",x,dfn[x],low[x]);
	if(low[x]>=dfn[x])
		whe[fr]=whe[fr^1]=1;
}
void get_b(int b,int x)
{
	int i,y;
	//printf("%d %d\n",b,x);
	bel[x]=b;
	for(i=he[x];i;i=ne[i])
		if(!whe[i]&&!bel[y=to[i]])
			get_b(b,y);
}
void ins2(int x,int y)
{
	ne2[++es2]=he2[x],he2[x]=es2,to2[es2]=y;
}
void dfs2(int x)
{
	int i,y;
	for(i=0;fa[x][i];i++)
		fa[x][i+1]=fa[fa[x][i]][i];
	for(i=he2[x];i;i=ne2[i])
		if((y=to2[i])!=fa[x][0])
			fa[y][0]=x,dep[y]=dep[x]+1,dfs2(y);
}
inline int LCA(int x,int y)
{
	if(dep[x]<dep[y]) swap(x,y);
	int i;
	for(i=maxb-1;i>=0;i--)
		if(dep[x]-dep[y]>=1<<i)
			x=fa[x][i];
	if(x==y) return x;
	for(i=maxb-1;i>=0;i--)
		if(fa[x][i]!=fa[y][i])
			x=fa[x][i],y=fa[y][i];
	return fa[x][0];
}
bool check(int x)
{
	int i,y;
	bool z=1;
	for(i=he2[x];i;i=ne2[i])
		if((y=to2[i])!=fa[x][0])
		{
			z&=check(y);
			len[x][0]=max(len[x][0],len[y][0]-1);
			len[x][1]=max(len[x][1],len[y][1]-1);
		}
	return z&(!len[x][0]||!len[x][1]);
}
int main()
{
#ifndef ONLINE_JUDGE
	freopen("data.in","r",stdin);
	freopen("data.out","w",stdout);
#endif
	int i,j,x,y;
	scanf("%d%d%d",&n,&m,&q);
	for(i=0;i<m;i++)
		scanf("%d%d",&x,&y),ins(x,y),ins(y,x);
	for(i=1;i<=n;i++)
		if(!dfn[i])
			dfs(i,0);
	for(i=1;i<=n;i++)
		if(!bel[i])
			get_b(++bs,i);
	for(i=1;i<=n;i++)
		for(j=he[i];j;j=ne[j])
			if(bel[i]!=bel[to[j]])
				ins2(bel[i],bel[to[j]]);
	for(i=1;i<=n;i++)
		dfs2(i);
	while(q--)
	{
		int lca;
		scanf("%d%d",&x,&y);
		x=bel[x],y=bel[y];
		lca=LCA(x,y);
		if(!lca) anss=0;
		len[x][0]=max(len[x][0],dep[x]-dep[lca]);
		len[y][1]=max(len[y][1],dep[y]-dep[lca]);
	}
	if(anss) anss=check(1);
	printf("%s\n",ans[anss]);
	return 0;
}


#include<stdio.h>
#include<algorithm>
#define mp make_pair
#define ft first
#define sd second
using namespace std;
typedef pair<int,int> pii;
const int maxn=200050,maxm=200050,maxb=18;
int n,m,q,anss;
char ans[2][5]={"No","Yes"};
int es=1,he[maxn],ne[maxm*2],to[maxm*2];
bool whe[maxm*2];
int tim=0,dfn[maxn],low[maxn],bel[maxn],bs=0;
pii st[maxm];
int top=0;
int es2=1,he2[maxn],ne2[maxm*2],to2[maxm*2];
int fa[maxn][maxb],dep[maxn];
int len[maxn][2]; //0^ 1v
void ins(int x,int y)
{
	ne[++es]=he[x],he[x]=es,to[es]=y;
}
void dfs(int x,int fr)
{
	int i,y;
	low[x]=dfn[x]=++tim;
	for(i=he[x];i;i=ne[i])
		if(i!=fr)
		{
			if(!dfn[y=to[i]])
				dfs(y,i^1),low[x]=min(low[x],low[y]);
			else low[x]=min(low[x],dfn[y]);
		}
	//printf("%d %d %d\n",x,dfn[x],low[x]);
	if(low[x]>=dfn[x])
		whe[fr]=whe[fr^1]=1;
}
void get_b(int b,int x)
{
	int i,y;
	//printf("%d %d\n",b,x);
	bel[x]=b;
	for(i=he[x];i;i=ne[i])
		if(!whe[i]&&!bel[y=to[i]])
			get_b(b,y);
}
void ins2(int x,int y)
{
	ne2[++es2]=he2[x],he2[x]=es2,to2[es2]=y;
}
void dfs2(int x)
{
	int i,y;
	for(i=0;fa[x][i];i++)
		fa[x][i+1]=fa[fa[x][i]][i];
	for(i=he2[x];i;i=ne2[i])
		if((y=to2[i])!=fa[x][0])
			fa[y][0]=x,dep[y]=dep[x]+1,dfs2(y);
}
inline int LCA(int x,int y)
{
	if(dep[x]<dep[y]) swap(x,y);
	int i;
	for(i=maxb-1;i>=0;i--)
		if(dep[x]-dep[y]>=1<<i)
			x=fa[x][i];
	if(x==y) return x;
	for(i=maxb-1;i>=0;i--)
		if(fa[x][i]!=fa[y][i])
			x=fa[x][i],y=fa[y][i];
	return fa[x][0];
}
bool check(int x)
{
	int i,y;
	bool z=1;
	for(i=he2[x];i;i=ne2[i])
		if((y=to2[i])!=fa[x][0])
		{
			z&=check(y);
			len[x][0]=max(len[x][0],len[y][0]-1);
			len[x][1]=max(len[x][1],len[y][1]-1);
		}
	return z&(!len[x][0]||!len[x][1]);
}
int main()
{
#ifndef ONLINE_JUDGE
	freopen("data.in","r",stdin);
	freopen("data.out","w",stdout);
#endif
	int i,j,x,y;
	scanf("%d%d%d",&n,&m,&q);
	for(i=0;i<m;i++)
		scanf("%d%d",&x,&y),ins(x,y),ins(y,x);
	dfs(1,0);
	for(i=1;i<=n;i++)
		if(!bel[i])
			get_b(++bs,i);
	for(i=1;i<=n;i++)
		for(j=he[i];j;j=ne[j])
			if(bel[i]!=bel[to[j]])
				ins2(bel[i],bel[to[j]]);
	dfs2(1);
	while(q--)
	{
		int lca;
		scanf("%d%d",&x,&y);
		x=bel[x],y=bel[y];
		lca=LCA(x,y);
		len[x][0]=max(len[x][0],dep[x]-dep[lca]);
		len[y][1]=max(len[y][1],dep[y]-dep[lca]);
	}
	anss=check(1);
	printf("%s\n",ans[anss]);
	return 0;
}


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

#define ms(s, n) memset(s, n, sizeof(s))
#define FOR(i, a, b) for(int i = a; i < b; i++)
#define FORd(i, a, b) for(int i = a - 1; i >= b; i--)
#define sz(a) int((a).size())
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<pi> vii;
ll gcd(ll a, ll b) {ll r; while (b != 0) {r = a % b; a = b; b = r;} return a;}
ll lcm(ll a, ll b) {return a / gcd(a, b) * b;}

const int maxn = 200010;
int n, m, q;
vi adj[maxn];
vi adj2[maxn];
int num[maxn];
int low[maxn];
int p[maxn];
int cnt;
map<pi, int> edge, mp;

int dp[maxn];
void init() {
	FOR(i, 0, maxn) dp[i] = i;
}
int find(int u) {
	return dp[u] == u ? u : dp[u] = find(dp[u]);
}
void join(int u, int v) {
	dp[find(u)] = find(v);
}

void dfs(int u) {
	num[u] = low[u] = ++cnt;
	FOR(i, 0, sz(adj[u])) {
		int v = adj[u][i];
		if (!num[v]) {p[v] = u; dfs(v); low[u] = min(low[u], low[v]);}
		else if (p[u] != v || edge[make_pair(u, v)] >= 2) {
			low[u] = min(low[u], num[v]);
		}
	}
}

const int maxe = 30;
int nchain, nbase;
int hchain[maxn];
int ichain[maxn];
int size[maxn];
int pib[maxn];
int vis[maxn];
int lev[maxn];
int par[maxe][maxn];
int root[maxn];
int tin[maxn];
int tou[maxn];
int tms = 0;

int st[2][4 * maxn];
void updateintervaltree(int node, int l, int r, int L, int R, bool val) {
    //cout<<l<<" "<<r<<" "<<val<<endl; return;
	if (l > R || r < L) return;
	if (l <= L && r >= R) {
		st[val][node] = 1;
		if (st[0][node] & st[1][node]) {printf("No"); exit(0);}
		return;
	}
	updateintervaltree(node << 1, l, r, L, (L + R) >> 1, val);
	updateintervaltree((node << 1) + 1, l, r, ((L + R) >> 1) + 1, R, val);
	//FOR(i, 0, 2) st[i][node] = st[i][node << 1] | st[i][(node << 1) + 1];
	//if (st[0][node] & st[1][node]) {printf("No"); exit(0);}
}

void dfs2(int u, int r) {
	tin[u] = tms++;
	vis[u] = size[u] = 1;
	root[u] = r;
	FOR(i, 1, maxe) par[i][u] = par[i - 1][par[i - 1][u]];
	FOR(i, 0, sz(adj2[u])) {
		int v = adj2[u][i];
		if (!vis[v]) {
			par[0][v] = u; lev[v] = lev[u] + 1; dfs2(v, r);
			size[u] += size[v];
		}
	}
	tou[u] = tms++;
}

int lca(int u, int v) {
	if (lev[u] < lev[v]) swap(u, v);
	if (tin[v] <= tin[u] && tou[v] >= tou[u]) return v;
	FORd(i, maxe, 0) if (lev[u] - (1 << i) >= lev[v]) u = par[i][u];
	FORd(i, maxe, 0) if (par[i][u] != par[i][v]) {u = par[i][u]; v = par[i][v];}
	return par[0][u];
}

void hld(int u) {
	if (hchain[nchain] == -1) hchain[nchain] = u;
	ichain[u] = nchain;
	pib[u] = nbase++;
	int tmp = -1;
	FOR(i, 0, sz(adj2[u])) {
		int v = adj2[u][i];
		if (v != par[0][u]) {
			if (tmp == -1 || size[v] > size[tmp]) tmp = v;
		}
	}
	if (tmp != -1) hld(tmp);
	FOR(i, 0, sz(adj2[u])) {
		int v = adj2[u][i];
		if (v != par[0][u] && v != tmp) {
			nchain++;
			hld(v);
		}
	}
}

void update(int u, int a, bool val) {
     //cout<<u<<" "<<a<<" "<<val<<endl;
	int uchain = ichain[u], achain = ichain[a];
	while (1) {
        //cout<<uchain<<" "<<achain<<endl;
		if (uchain == achain) {
			//cout<<pib[a] + 1<<" "<<pib[u]<<endl;
			updateintervaltree(1, pib[a] + 1, pib[u], 0, n - 1, val);
			return;
		}
		//cout<<pib[hchain[uchain]] + 1<<" "<<pib[u]<<endl;
		updateintervaltree(1, pib[hchain[uchain]] + 1, pib[u], 0, n - 1, val);
		u = par[0][hchain[uchain]];
		uchain = ichain[u];
	}
}

void solve() {
	scanf("%d%d%d", &n, &m, &q);
	FOR(i, 0, m) {
		int u, v; scanf("%d%d", &u, &v); u--; v--;
		adj[u].push_back(v); adj[v].push_back(u);
		edge[make_pair(u, v)]++;
		edge[make_pair(v, u)]++;
	}
	ms(p, -1); ms(num, 0); ms(low, 0); cnt = 0;
	FOR(i, 0, n) if (!num[i]) dfs(i);
	init();
	FOR(i, 0, n) if (low[i] < num[i]) join(i, p[i]);
	FOR(i, 0, n) {
		FOR(j, 0, sz(adj[i])) {
			int k = adj[i][j];
			int u = find(i);
			int v = find(k);
			if (u == v) continue;
			if (!mp[make_pair(u, v)]) {
				adj2[u].push_back(v);
				adj2[v].push_back(u);
				mp[make_pair(u, v)] = mp[make_pair(v, u)] = 1;
			}
		}
	}
	ms(vis, 0); ms(par, 0); ms(lev, 0);
	int nroot = 0;
	FOR(i, 0, n) if (!vis[i]) dfs2(i, nroot++);
	ms(hchain, -1); ms(ichain, -1); ms(pib, -1); nchain = nbase = 0;
	FOR(i, 0, n) if (pib[i] == -1) {hld(i); nchain++;}
	ms(st, 0);
	//FOR(i, 0, n) cout<<pib[i]<<" "; return;
	while (q--) {
		int x, y; scanf("%d%d", &x, &y); x--; y--;
		x = find(x); y = find(y);
		if (x == y) continue;
		if (root[x] != root[y]) {printf("No"); exit(0);}
		int z = lca(x, y);
		//cout<<x<<" "<<y<<" "<<z<<":"<<endl;
		update(x, z, 1);
		update(y, z, 0);
	}
	printf("Yes");
}

int main() {
#ifdef _LOCAL_
	freopen("in.txt", "r", stdin); freopen("out.txt", "w", stdout);
#endif
	solve();
#ifdef _LOCAL_
	printf("\nTime elapsed: %dms", 1000 * clock() / CLOCKS_PER_SEC);
#endif
	return 0;
}


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

#define ms(s, n) memset(s, n, sizeof(s))
#define FOR(i, a, b) for(int i = a; i < b; i++)
#define FORd(i, a, b) for(int i = a - 1; i >= b; i--)
#define sz(a) int((a).size())
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<pi> vii;
ll gcd(ll a, ll b) {ll r; while (b != 0) {r = a % b; a = b; b = r;} return a;}
ll lcm(ll a, ll b) {return a / gcd(a, b) * b;}

const int maxn = 200010;
int n, m, q;
vi adj1[maxn];
vi adj2[maxn];
int num[maxn];
int low[maxn];
int p[maxn];
int cnt;
map<pi, int> edge, mp;

int r[maxn];
void init() {
	FOR(i, 0, maxn) r[i] = i;
}
int find(int u) {
	return u == r[u] ? u : r[u] = find(r[u]);
}
void join(int u, int v) {
	r[find(u)] = find(v);
}

void dfs(int u) {
	num[u] = low[u] = ++cnt;
	FOR(i, 0, sz(adj1[u])) {
		int v = adj1[u][i];
		if (!num[v]) {p[v] = u; dfs(v); low[u] = min(low[u], low[v]);}
		else if (p[u] != v || edge[make_pair(u, v)] >= 2) low[u] = min(low[u], num[v]);
	}
}

const int maxe = 30;
int nchain, nbase;
int hchain[maxn];
int ichain[maxn];
int size[maxn];
int pib[maxn];
int vis[maxn];
int lev[maxn];
int par[maxe][maxn];
int root[maxn];
int tin[maxn];
int tou[maxn];
int tms = 0;

int st[2][4 * maxn];
void updateintervaltree(int node, int l, int r, int L, int R, bool val) {
	if (l > R || r < L) return;
	if (l <= L && r >= R) {
		st[val][node] = 1;
		if (st[0][node] & st[1][node]) {printf("No"); exit(0);}
		return;
	}
	updateintervaltree(node << 1, l, r, L, (L + R) >> 1, val);
	updateintervaltree((node << 1) + 1, l, r, ((L + R) >> 1) + 1, R, val);
}

void dfs2(int u, int r) {
	tin[u] = tms++;
	vis[u] = size[u] = 1;
	root[u] = r;
	FOR(i, 1, maxe) par[i][u] = par[i - 1][par[i - 1][u]];
	FOR(i, 0, sz(adj2[u])) {
		int v = adj2[u][i];
		if (!vis[v]) {
			par[0][v] = u; lev[v] = lev[u] + 1; dfs2(v, r);
			size[u] += size[v];
		}
	}
	tou[u] = tms++;
}

int lca(int u, int v) {
	if (lev[u] < lev[v]) swap(u, v);
	if (tin[v] <= tin[u] && tou[v] >= tou[u]) return v;
	FORd(i, maxe, 0) if (lev[u] - (1 << i) >= lev[v]) u = par[i][u];
	FORd(i, maxe, 0) if (par[i][u] != par[i][v]) {u = par[i][u]; v = par[i][v];}
	return par[0][u];
}

void hld(int u) {
	if (hchain[nchain] == -1) hchain[nchain] = u;
	ichain[u] = nchain;
	pib[u] = nbase++;
	int tmp = -1;
	FOR(i, 0, sz(adj2[u])) {
		int v = adj2[u][i];
		if (v != par[0][u]) {
			if (tmp == -1 || size[v] > size[tmp]) tmp = v;
		}
	}
	if (tmp != -1) hld(tmp);
	FOR(i, 0, sz(adj2[u])) {
		int v = adj2[u][i];
		if (v != par[0][u] && v != tmp) {
			nchain++;
			hld(v);
		}
	}
}

void update(int u, int a, bool val) {
	int uchain = ichain[u], achain = ichain[a];
	while (1) {
		if (uchain == achain) {
			updateintervaltree(1, pib[a] + 1, pib[u], 0, n - 1, val);
			return;
		}
		updateintervaltree(1, pib[hchain[uchain]] + 1, pib[u], 0, n - 1, val);
		u = par[0][hchain[uchain]];
		uchain = ichain[u];
	}
}

void solve() {
	scanf("%d%d%d", &n, &m, &q);
	FOR(i, 0, m) {
		int u, v; scanf("%d%d", &u, &v); u--; v--;
		adj1[u].push_back(v); adj1[v].push_back(u);
		edge[make_pair(u, v)]++;
		edge[make_pair(v, u)]++;
	}
	ms(p, -1); ms(num, 0); ms(low, 0); cnt = 0;
	FOR(i, 0, n) if (!num[i]) dfs(i);
	init();
	FOR(i, 0, n) if (low[i] < num[i]) join(i, p[i]);
	FOR(i, 0, n) {
		FOR(j, 0, sz(adj1[i])) {
			int k = adj1[i][j];
			int u = find(i);
			int v = find(k);
			if (u == v) continue;
			if (!mp[make_pair(u, v)]) {
				adj2[u].push_back(v);
				adj2[v].push_back(u);
				mp[make_pair(u, v)] = mp[make_pair(v, u)] = 1;
			}
		}
	}
	ms(vis, 0); ms(par, 0); ms(lev, 0);
	int nroot = 0;
	FOR(i, 0, n) if (!vis[i]) dfs2(i, nroot++);
	ms(hchain, -1); ms(ichain, -1); ms(pib, -1); nchain = nbase = 0;
	FOR(i, 0, n) if (pib[i] == -1) {hld(i); nchain++;}
	ms(st, 0);
	while (q--) {
		int x, y; scanf("%d%d", &x, &y); x--; y--;
		x = find(x); y = find(y);
		if (x == y) continue;
		if (root[x] != root[y]) {printf("No"); exit(0);}
		int z = lca(x, y);
		update(x, z, 1);
		update(y, z, 0);
	}
	printf("Yes");
}

int main() {
#ifdef _LOCAL_
	freopen("in.txt", "r", stdin); freopen("out.txt", "w", stdout);
#endif
	solve();
#ifdef _LOCAL_
	printf("\nTime elapsed: %dms", 1000 * clock() / CLOCKS_PER_SEC);
#endif
	return 0;
}


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

#define ms(s, n) memset(s, n, sizeof(s))
#define FOR(i, a, b) for(int i = a; i < b; i++)
#define FORd(i, a, b) for(int i = a - 1; i >= b; i--)
#define sz(a) int((a).size())
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<pi> vii;
ll gcd(ll a, ll b) {ll r; while (b != 0) {r = a % b; a = b; b = r;} return a;}
ll lcm(ll a, ll b) {return a / gcd(a, b) * b;}

const int maxn = 200010;
int n, m, q;
vi adj[maxn];
vi adj2[maxn];
int num[maxn];
int low[maxn];
int p[maxn];
int cnt;
map<pi, int> edge, mp;

void dfs(int u) {
	num[u] = low[u] = ++cnt;
	FOR(i, 0, sz(adj[u])) {
		int v = adj[u][i];
		//cout<<u<<" "<<v<<" "<<num[v]<<endl;
		if (!num[v]) {p[v] = u; dfs(v); low[u] = min(low[u], low[v]);}
		else if (p[u] != v || edge[make_pair(u, v)] >= 2) {
             low[u] = min(low[u], num[v]);
             //cout<<":"<<u<<" "<<v<<endl;
			 //cout<<low[u]<<" "<<low[v]<<endl;
        }
	}
}

const int maxe = 30;
int nchain, nbase;
int hchain[maxn];
int ichain[maxn];
int size[maxn];
int pib[maxn];
int vis[maxn];
int lev[maxn];
int par[maxe][maxn];
int root[maxn];

int st[2][4 * maxn];
void updateintervaltree(int node, int l, int r, int L, int R, bool val) {
	if (l > R || r < L) return;
	if (l <= L && r >= R) {
		st[val][node] = 1;
		if (st[0][node] & st[1][node]) {printf("No"); exit(0);}
		return;
	}
	updateintervaltree(node << 1, l, r, L, (L + R) >> 1, val);
	updateintervaltree((node << 1) + 1, l, r, ((L + R) >> 1) + 1, R, val);
	FOR(i, 0, 2) st[i][node] = st[i][node << 1] | st[i][(node << 1) + 1];
	if (st[0][node] & st[1][node]) {printf("No"); exit(0);}
}

void dfs2(int u, int r) {
	vis[u] = size[u] = 1;
	root[u] = r;
	FOR(i, 1, maxe) par[i][u] = par[i - 1][par[i - 1][u]];
	FOR(i, 0, sz(adj2[u])) {
		int v = adj2[u][i];
		if (!vis[v]) {
			par[0][v] = u; lev[v] = lev[u] + 1; dfs2(v, r);
			size[u] += size[v];
		}
	}
}

int lca(int u, int v) {
	if (lev[u] < lev[v]) swap(u, v);
	FORd(i, maxe, 0) if (lev[u] - (1 << i) >= lev[v]) u = par[i][u];
	FORd(i, maxe, 0) if (par[i][u] != par[i][v]) {u = par[i][u]; v = par[i][v];}
	return par[0][u];
}

void hld(int u) {
	if (hchain[nchain] == -1) hchain[nchain] = u;
	ichain[u] = nchain;
	pib[u] = nbase++;
	int tmp = -1;
	FOR(i, 0, sz(adj2[u])) {
		int v = adj2[u][i];
		if (v != par[0][u]) {
			if (tmp == -1 || size[v] > size[tmp]) tmp = v;
		}
	}
	if (tmp != -1) hld(tmp);
	FOR(i, 0, sz(adj2[u])) {
		int v = adj2[u][i];
		if (v != par[0][u] && v != tmp) {
			nchain++;
			hld(v);
		}
	}
}

void update(int u, int a, bool val) {
	int uchain = ichain[u], achain = ichain[a];
	while (1) {
		if (uchain == achain) {
			updateintervaltree(1, pib[a] + 1, pib[u], 0, n - 1, val);
			break;
		}
		updateintervaltree(1, pib[hchain[uchain]] + 1, pib[u], 0, n - 1, val);
		u = par[0][hchain[uchain]];
		uchain = ichain[u];
	}
}

void solve() {
	scanf("%d%d%d", &n, &m, &q);
	FOR(i, 0, m) {
		int u, v; scanf("%d%d", &u, &v); u--; v--;
		adj[u].push_back(v); adj[v].push_back(u);
		//cout<<u<<" "<<v<<endl;
		edge[make_pair(u, v)]++;
		edge[make_pair(v, u)]++;
		//adj2[u].push_back(v); adj2[v].push_back(u);
	}
	ms(p, -1); ms(num, 0); ms(low, 0); cnt = 0;
	FOR(i, 0, n) if (!num[i]) dfs(i);
	FOR(i, 0, n) {
		//cout<<low[i]<<" ";
		FOR(j, 0, sz(adj[i])) {
			int k = adj[i][j];
			int u = low[i] - 1;
			int v = low[k] - 1;
			if (u == v) continue;
			if (!mp[make_pair(u, v)]) {
				adj2[u].push_back(v);
				adj2[v].push_back(u);
				mp[make_pair(u, v)] = mp[make_pair(v, u)] = 1;
				//cout<<u<<" "<<v<<endl;
			}
		}
	}
	ms(vis, 0); ms(par, 0); ms(lev, 0);
	int nroot = 0;
	FOR(i, 0, n) if (!vis[i]) dfs2(i, nroot++);
	ms(hchain, -1); ms(ichain, -1); ms(pib, -1); nchain = nbase = 0;
	FOR(i, 0, n) if (pib[i] == -1) hld(i);
	ms(st, 0);
	while (q--) {
		int x, y; scanf("%d%d", &x, &y); x--; y--;
		x = low[x] - 1; y = low[y] - 1;
		if (x == y) continue;
		if (root[x] != root[y]) {printf("No"); exit(0);}
		int z = lca(x, y);
		update(x, z, 1);
		update(y, z, 0);
	}
	printf("Yes");
}

int main() {
#ifdef _LOCAL_
	freopen("in.txt", "r", stdin); freopen("out.txt", "w", stdout);
#endif
	solve();
#ifdef _LOCAL_
	printf("\nTime elapsed: %dms", 1000 * clock() / CLOCKS_PER_SEC);
#endif
	return 0;
}


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

#define ms(s, n) memset(s, n, sizeof(s))
#define FOR(i, a, b) for(int i = a; i < b; i++)
#define FORd(i, a, b) for(int i = a - 1; i >= b; i--)
#define sz(a) int((a).size())
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<pi> vii;
ll gcd(ll a, ll b) {ll r; while (b != 0) {r = a % b; a = b; b = r;} return a;}
ll lcm(ll a, ll b) {return a / gcd(a, b) * b;}

const int maxn = 200010;
int n, m, q;
vi adj1[maxn];
vi adj2[maxn];
int num[maxn];
int low[maxn];
int p[maxn];
int cnt;
map<pi, int> edge, mp;

int r[maxn];
void init() {
    FOR(i, 0, maxn) r[i] = i;
}
int find(int u) {
    return u == r[u] ? u : r[u] = find(r[u]);
}
void join(int u, int v) {
    r[find(u)] = find(v);
}

void dfs(int u) {
    num[u] = low[u] = ++cnt;
    FOR(i, 0, sz(adj1[u])) {
        int v = adj1[u][i];
        if (!num[v]) {p[v] = u; dfs(v); low[u] = min(low[u], low[v]);}
        else if (p[u] != v || edge[make_pair(u, v)] >= 2) low[u] = min(low[u], num[v]);
    }
}

const int maxe = 30;
int nchain, nbase;
int hchain[maxn];
int ichain[maxn];
int size[maxn];
int pib[maxn];
int vis[maxn];
int lev[maxn];
int par[maxe][maxn];
int root[maxn];
int tin[maxn];
int tou[maxn];
int tms = 0;

int st[2][4 * maxn];
void updateintervaltree(int node, int l, int r, int L, int R, bool val) {
    if (l > R || r < L) return;
    if (l <= L && r >= R) {
        st[val][node] = 1;
        if (st[0][node] & st[1][node]) {printf("No"); exit(0);}
        return;
    }
    updateintervaltree(node << 1, l, r, L, (L + R) >> 1, val);
    updateintervaltree((node << 1) + 1, l, r, ((L + R) >> 1) + 1, R, val);
}

void dfs2(int u, int r) {
    tin[u] = tms++;
    vis[u] = size[u] = 1;
    root[u] = r;
    FOR(i, 1, maxe) par[i][u] = par[i - 1][par[i - 1][u]];
    FOR(i, 0, sz(adj2[u])) {
        int v = adj2[u][i];
        if (!vis[v]) {
            par[0][v] = u; lev[v] = lev[u] + 1; dfs2(v, r);
            size[u] += size[v];
        }
    }
    tou[u] = tms++;
}

int lca(int u, int v) {
    if (lev[u] < lev[v]) swap(u, v);
    if (tin[v] <= tin[u] && tou[v] >= tou[u]) return v;
    FORd(i, maxe, 0) if (lev[u] - (1 << i) >= lev[v]) u = par[i][u];
    FORd(i, maxe, 0) if (par[i][u] != par[i][v]) {u = par[i][u]; v = par[i][v];}
    return par[0][u];
}

void hld(int u) {
    if (hchain[nchain] == -1) hchain[nchain] = u;
    ichain[u] = nchain;
    pib[u] = nbase++;
    int tmp = -1;
    FOR(i, 0, sz(adj2[u])) {
        int v = adj2[u][i];
        if (v != par[0][u]) {
            if (tmp == -1 || size[v] > size[tmp]) tmp = v;
        }
    }
    if (tmp != -1) hld(tmp);
    FOR(i, 0, sz(adj2[u])) {
        int v = adj2[u][i];
        if (v != par[0][u] && v != tmp) {
            nchain++;
            hld(v);
        }
    }
}

void update(int u, int a, bool val) {
    int uchain = ichain[u], achain = ichain[a];
    while (1) {
        if (uchain == achain) {
            updateintervaltree(1, pib[a] + 1, pib[u], 0, n - 1, val);
            return;
        }
        updateintervaltree(1, pib[hchain[uchain]], pib[u], 0, n - 1, val);
        u = par[0][hchain[uchain]];
        uchain = ichain[u];
    }
}

void solve() {
    scanf("%d%d%d", &n, &m, &q);
    FOR(i, 0, m) {
        int u, v; scanf("%d%d", &u, &v); u--; v--;
        adj1[u].push_back(v); adj1[v].push_back(u);
        edge[make_pair(u, v)]++;
        edge[make_pair(v, u)]++;
    }
    ms(p, -1); ms(num, 0); ms(low, 0); cnt = 0;
    FOR(i, 0, n) if (!num[i]) dfs(i);
    init();
    FOR(i, 0, n) if (low[i] < num[i]) join(i, p[i]);
    FOR(i, 0, n) {
        FOR(j, 0, sz(adj1[i])) {
            int k = adj1[i][j];
            int u = find(i);
            int v = find(k);
            if (u == v) continue;
            if (!mp[make_pair(u, v)]) {
                adj2[u].push_back(v);
                adj2[v].push_back(u);
                mp[make_pair(u, v)] = mp[make_pair(v, u)] = 1;
            }
        }
    }
    ms(vis, 0); ms(par, 0); ms(lev, 0);
    int nroot = 0;
    FOR(i, 0, n) if (!vis[i]) dfs2(i, nroot++);
    ms(hchain, -1); ms(ichain, -1); ms(pib, -1); nchain = nbase = 0;
    FOR(i, 0, n) if (pib[i] == -1) {hld(i); nchain++;}
    ms(st, 0);
    while (q--) {
        int x, y; scanf("%d%d", &x, &y); x--; y--;
        x = find(x); y = find(y);
        if (x == y) continue;
        if (root[x] != root[y]) {printf("No"); exit(0);}
        int z = lca(x, y);
        update(x, z, 1);
        update(y, z, 0);
    }
    printf("Yes");
}

int main() {
#ifdef _LOCAL_
    freopen("in.txt", "r", stdin); freopen("out.txt", "w", stdout);
#endif
    solve();
#ifdef _LOCAL_
    printf("\nTime elapsed: %dms", 1000 * clock() / CLOCKS_PER_SEC);
#endif
    return 0;
}


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

#define ms(s, n) memset(s, n, sizeof(s))
#define FOR(i, a, b) for(int i = a; i < b; i++)
#define FORd(i, a, b) for(int i = a - 1; i >= b; i--)
#define sz(a) int((a).size())
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<pi> vii;
ll gcd(ll a, ll b) {ll r; while (b != 0) {r = a % b; a = b; b = r;} return a;}
ll lcm(ll a, ll b) {return a / gcd(a, b) * b;}

const int maxn = 200010;
int n, m, q;
vi adj[maxn];
vi adj2[maxn];
int num[maxn];
int low[maxn];
int p[maxn];
int cnt;
map<pi, int> edge, mp;

void dfs(int u) {
	num[u] = low[u] = ++cnt;
	FOR(i, 0, sz(adj[u])) {
		int v = adj[u][i];
		//cout<<u<<" "<<v<<" "<<num[v]<<endl;
		if (!num[v]) {p[v] = u; dfs(v); low[u] = min(low[u], low[v]);}
		else if (p[u] != v || edge[make_pair(u, v)] >= 2) {
             low[u] = min(low[u], num[v]);
             //cout<<":"<<u<<" "<<v<<endl;
			 //cout<<low[u]<<" "<<low[v]<<endl;
        }
	}
}

const int maxe = 30;
int nchain, nbase;
int hchain[maxn];
int ichain[maxn];
int size[maxn];
int pib[maxn];
int vis[maxn];
int lev[maxn];
int par[maxe][maxn];
int root[maxn];

int st[2][4 * maxn];
void updateintervaltree(int node, int l, int r, int L, int R, bool val) {
	if (l > R || r < L) return;
	if (l <= L && r >= R) {
		st[val][node] = 1;
		if (st[0][node] & st[1][node]) {printf("No"); exit(0);}
		return;
	}
	updateintervaltree(node << 1, l, r, L, (L + R) >> 1, val);
	updateintervaltree((node << 1) + 1, l, r, ((L + R) >> 1) + 1, R, val);
	FOR(i, 0, 2) st[i][node] = st[i][node << 1] | st[i][(node << 1) + 1];
	if (st[0][node] & st[1][node]) {printf("No"); exit(0);}
}

void dfs2(int u, int r) {
	vis[u] = size[u] = 1;
	root[u] = r;
	FOR(i, 1, maxe) par[i][u] = par[i - 1][par[i - 1][u]];
	FOR(i, 0, sz(adj2[u])) {
		int v = adj2[u][i];
		if (!vis[v]) {
			par[0][v] = u; lev[v] = lev[u] + 1; dfs2(v, r);
			size[u] += size[v];
		}
	}
}

int lca(int u, int v) {
	if (lev[u] < lev[v]) swap(u, v);
	FORd(i, maxe, 0) if (lev[u] - (1 << i) >= lev[v]) u = par[i][u];
	FORd(i, maxe, 0) if (par[i][u] != par[i][v]) {u = par[i][u]; v = par[i][v];}
	return par[0][u];
}

void hld(int u) {
	if (hchain[nchain] == -1) hchain[nchain] = u;
	ichain[u] = nchain;
	pib[u] = nbase++;
	int tmp = -1;
	FOR(i, 0, sz(adj2[u])) {
		int v = adj2[u][i];
		if (v != par[0][u]) {
			if (tmp == -1 || size[v] > size[tmp]) tmp = v;
		}
	}
	if (tmp != -1) hld(tmp);
	FOR(i, 0, sz(adj2[u])) {
		int v = adj2[u][i];
		if (v != par[0][u] && v != tmp) {
			nchain++;
			hld(v);
		}
	}
}

void update(int u, int a, bool val) {
	int uchain = ichain[u], achain = ichain[a];
	while (1) {
		if (uchain == achain) {
			updateintervaltree(1, pib[a] + 1, pib[u], 0, n - 1, val);
			break;
		}
		updateintervaltree(1, pib[hchain[uchain]] + 1, pib[u], 0, n - 1, val);
		u = par[0][hchain[uchain]];
		uchain = ichain[u];
	}
}

void solve() {
	scanf("%d%d%d", &n, &m, &q);
	FOR(i, 0, m) {
		int u, v; scanf("%d%d", &u, &v); u--; v--;
		adj[u].push_back(v); adj[v].push_back(u);
		//cout<<u<<" "<<v<<endl;
		edge[make_pair(u, v)]++;
		edge[make_pair(v, u)]++;
		//adj2[u].push_back(v); adj2[v].push_back(u);
	}
	ms(p, -1); ms(num, 0); ms(low, 0); cnt = 0;
	FOR(i, 0, n) if (!num[i]) dfs(i);
	FOR(i, 0, n) {
		//cout<<low[i]<<" ";
		FOR(j, 0, sz(adj[i])) {
			int k = adj[i][j];
			int u = low[i] - 1;
			int v = low[k] - 1;
			if (u == v) continue;
			if (!mp[make_pair(u, v)]) {
				adj2[u].push_back(v);
				adj2[v].push_back(u);
				mp[make_pair(u, v)] = mp[make_pair(v, u)] = 1;
				//cout<<u<<" "<<v<<endl;
			}
		}
	}
	ms(vis, 0); ms(par, 0); ms(lev, 0);
	int nroot = 0;
	FOR(i, 0, n) if (!vis[i]) dfs2(i, nroot++);
	ms(hchain, -1); ms(ichain, -1); ms(pib, -1); nchain = nbase = 0;
	FOR(i, 0, n) if (pib[i] == -1) hld(i);
	ms(st, 0);
	while (q--) {
		int x, y; scanf("%d%d", &x, &y); x--; y--;
		x = low[x] - 1; y = low[y] - 1;
		if (root[x] != root[y]) {printf("No"); exit(0);}
		int z = lca(x, y);
		update(x, z, 1);
		update(y, z, 0);
	}
	printf("Yes");
}

int main() {
#ifdef _LOCAL_
	freopen("in.txt", "r", stdin); freopen("out.txt", "w", stdout);
#endif
	solve();
#ifdef _LOCAL_
	printf("\nTime elapsed: %dms", 1000 * clock() / CLOCKS_PER_SEC);
#endif
	return 0;
}


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

#define ms(s, n) memset(s, n, sizeof(s))
#define FOR(i, a, b) for(int i = a; i < b; i++)
#define FORd(i, a, b) for(int i = a - 1; i >= b; i--)
#define sz(a) int((a).size())
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<pi> vii;
ll gcd(ll a, ll b) {ll r; while (b != 0) {r = a % b; a = b; b = r;} return a;}
ll lcm(ll a, ll b) {return a / gcd(a, b) * b;}

const int maxn = 200010;
int n, m, q;
vi adj[maxn];
vi adj2[maxn];
int num[maxn];
int low[maxn];
int p[maxn];
int cnt;
map<pi, int> edge, mp;

int dp[maxn];
void init() {
     FOR(i, 0, maxn) dp[i] = i;
}
int find(int u) {
    return dp[u] == u ? u : dp[u] = find(dp[u]);
}
void join(int u, int v) {
     dp[find(u)] = find(v);
}

void dfs(int u) {
	num[u] = low[u] = ++cnt;
	FOR(i, 0, sz(adj[u])) {
		int v = adj[u][i];
		//cout<<u<<" "<<v<<" "<<num[v]<<endl;
		if (!num[v]) {p[v] = u; dfs(v); low[u] = min(low[u], low[v]);}
		else if (p[u] != v || edge[make_pair(u, v)] >= 2) {
			 //num[u] = min(num[u], num[v]);
             low[u] = min(low[u], num[v]);
             //cout<<":"<<u<<" "<<v<<endl;
			 //cout<<low[u]<<" "<<low[v]<<endl;
        }
	}
}

const int maxe = 30;
int nchain, nbase;
int hchain[maxn];
int ichain[maxn];
int size[maxn];
int pib[maxn];
int vis[maxn];
int lev[maxn];
int par[maxe][maxn];
int root[maxn];

int st[2][4 * maxn];
void updateintervaltree(int node, int l, int r, int L, int R, bool val) {
	if (l > R || r < L) return;
	if (l <= L && r >= R) {
		st[val][node] = 1;
		if (st[0][node] & st[1][node]) {printf("No"); exit(0);}
		return;
	}
	updateintervaltree(node << 1, l, r, L, (L + R) >> 1, val);
	updateintervaltree((node << 1) + 1, l, r, ((L + R) >> 1) + 1, R, val);
	FOR(i, 0, 2) st[i][node] = st[i][node << 1] | st[i][(node << 1) + 1];
	if (st[0][node] & st[1][node]) {printf("No"); exit(0);}
}

void dfs2(int u, int r) {
	vis[u] = size[u] = 1;
	root[u] = r;
	FOR(i, 1, maxe) par[i][u] = par[i - 1][par[i - 1][u]];
	FOR(i, 0, sz(adj2[u])) {
		int v = adj2[u][i];
		if (!vis[v]) {
			par[0][v] = u; lev[v] = lev[u] + 1; dfs2(v, r);
			size[u] += size[v];
		}
	}
}

int lca(int u, int v) {
	if (lev[u] < lev[v]) swap(u, v);
	FORd(i, maxe, 0) if (lev[u] - (1 << i) >= lev[v]) u = par[i][u];
	FORd(i, maxe, 0) if (par[i][u] != par[i][v]) {u = par[i][u]; v = par[i][v];}
	return par[0][u];
}

void hld(int u) {
	if (hchain[nchain] == -1) hchain[nchain] = u;
	ichain[u] = nchain;
	pib[u] = nbase++;
	int tmp = -1;
	FOR(i, 0, sz(adj2[u])) {
		int v = adj2[u][i];
		if (v != par[0][u]) {
			if (tmp == -1 || size[v] > size[tmp]) tmp = v;
		}
	}
	if (tmp != -1) hld(tmp);
	FOR(i, 0, sz(adj2[u])) {
		int v = adj2[u][i];
		if (v != par[0][u] && v != tmp) {
			nchain++;
			hld(v);
		}
	}
}

void update(int u, int a, bool val) {
	int uchain = ichain[u], achain = ichain[a];
	while (1) {
		if (uchain == achain) {
			updateintervaltree(1, pib[a] + 1, pib[u], 0, n - 1, val);
			break;
		}
		updateintervaltree(1, pib[hchain[uchain]] + 1, pib[u], 0, n - 1, val);
		u = par[0][hchain[uchain]];
		uchain = ichain[u];
	}
}

void solve() {
	scanf("%d%d%d", &n, &m, &q);
	FOR(i, 0, m) {
		int u, v; scanf("%d%d", &u, &v); u--; v--;
		adj[u].push_back(v); adj[v].push_back(u);
		//cout<<u<<" "<<v<<endl;
		edge[make_pair(u, v)]++;
		edge[make_pair(v, u)]++;
		//adj2[u].push_back(v); adj2[v].push_back(u);
	}
	ms(p, -1); ms(num, 0); ms(low, 0); cnt = 0;
	FOR(i, 0, n) if (!num[i]) dfs(i);
	init();
	FOR(i, 0, n) if (low[i] < num[i]) {
           //cout<<i<<" "<<p[i]<<endl;
           join(i, p[i]);
}
	FOR(i, 0, n) {
		FOR(j, 0, sz(adj[i])) {
			int k = adj[i][j];
			int u = find(i);
			int v = find(k);
			if (u == v) continue;
			if (!mp[make_pair(u, v)]) {
				adj2[u].push_back(v);
				adj2[v].push_back(u);
				mp[make_pair(u, v)] = mp[make_pair(v, u)] = 1;
				//cout<<u<<" "<<v<<endl;
			}
		}
	}
	ms(vis, 0); ms(par, 0); ms(lev, 0);
	int nroot = 0;
	FOR(i, 0, n) if (!vis[i]) dfs2(i, nroot++);
	ms(hchain, -1); ms(ichain, -1); ms(pib, -1); nchain = nbase = 0;
	FOR(i, 0, n) if (pib[i] == -1) hld(i);
	ms(st, 0);
	while (q--) {
		int x, y; scanf("%d%d", &x, &y); x--; y--;
		x = find(x); y = find(y);
		if (x == y) continue;
		if (root[x] != root[y]) {printf("No"); exit(0);}
		int z = lca(x, y);
		update(x, z, 1);
		update(y, z, 0);
	}
	printf("Yes");
}

int main() {
#ifdef _LOCAL_
	freopen("in.txt", "r", stdin); freopen("out.txt", "w", stdout);
#endif
	solve();
#ifdef _LOCAL_
	printf("\nTime elapsed: %dms", 1000 * clock() / CLOCKS_PER_SEC);
#endif
	return 0;
}


#include <iostream>
#include <cstring>
#include <string>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <stack>
#include <queue>
#include <map>
#include <vector>
#include <cstdlib>
#include <set>
using namespace std;

#define LL long long
#define N 200020
#define M 400020
#define eps 1e-8
#define MP make_pair
#define Pi acos(-1.0)
#pragma comment(linker, "/STACK:1024000000,1024000000")
#define inf 0x3f3f3f3f
#define ls (i << 1)
#define rs (ls | 1)
#define md ((ll + rr) >> 1)
#define lson ll, md, ls
#define rson md + 1, rr, rs
#define mod 1000000007

int fst[N], nxt[M], vv[M], e;
void init() {
    memset(fst, -1, sizeof fst);
    e = 0;
}
void add(int u, int v) {
    vv[e] = v, nxt[e] = fst[u], fst[u] = e++;
}
int n, nn, m, q;
int ae[N];
int pre[N], dc;
bool isc[M];
bool vis[N];
int bcc[N];
int a[N], b[N], P[N];
int bcj[N];
int cnt[N];
vector<int> g[N];

int fa[22][N], dep[N];

int dfs(int u, int p) {
    int lowu = pre[u] = ++dc;

    for(int i = fst[u]; ~i; i = nxt[i]) {
        int v = vv[i];
        if(!pre[v]) {
            ae[v] = i;
            int lowv = dfs(v, u);
            if(lowv > pre[u]) {
                isc[i] = isc[i^1] = 1;
            }
            lowu = min(lowu, lowv);
        }
        else if(ae[u] != -1 && (ae[u] ^ i) != 1) lowu = min(lowu, pre[v]);
    }
    return lowu;
}

void dfs1(int u) {
    bcc[u] = dc;
    vis[u] = 1;
    for(int i = fst[u]; ~i; i = nxt[i]) {
        int v = vv[i];
        if(isc[i] || vis[v]) continue;
        dfs1(v);
    }
}

int find(int x) {
    if(bcj[x] != x) bcj[x] = find(bcj[x]);
    return bcj[x];
}

void dfs2(int u, int p, int D) {
    dep[u] = D;
    fa[0][u] = p;
    vis[u] = 1;

    for(int i = 0; i < g[u].size(); ++i) {
        int v = g[u][i];
        if(v == p) continue;
        bcj[find(u)] = find(v);
        dfs2(v, u, D + 1);
    }
}

void lca_init() {
    for(int k = 0; k < 21; ++k) {
        for(int i = 1; i <= dc; ++i) {
            if(fa[k][i] == -1)
                fa[k+1][i] = -1;
            else
                fa[k+1][i] = fa[k][fa[k][i]];
        }
    }
}
int lca(int u, int v) {
    if(dep[u] > dep[v]) swap(u, v);

    for(int k = 0; k < 22; ++k) {
        if((dep[v] - dep[u]) >> k & 1)
            v = fa[k][v];
    }
    if(u == v) return u;
    for(int k = 21; k >= 0; --k) {
        if(fa[k][u] != fa[k][v])
            u = fa[k][u], v = fa[k][v];
    }
    return fa[0][u];
}
void dfs3(int u, int p) {
    vis[u] = 1;
    for(int i = 0; i < g[u].size(); ++i) {
        int v = g[u][i];
        if(v == p) continue;
        dfs3(v, u);
        cnt[u] += cnt[v];
    }
}
void dfs4(int u, int p) {
    vis[u] = 1;
    for(int i = 0; i < g[u].size(); ++i) {
        int v = g[u][i];
        if(v == p || vis[v]) continue;
        cnt[v] += cnt[u];
        dfs4(v, u);
    }
}
int main() {
    //freopen("tt.txt", "r", stdin);
    while(scanf("%d%d%d", &n, &m, &q) != EOF) {
        init();
        for(int i = 1; i <= m; ++i) {
            int u, v;
            scanf("%d%d", &u, &v);
            add(u, v);
            add(v, u);
        }
        memset(ae, -1, sizeof ae);
        fill(g + 1, g + n + 1, vector<int>());
        memset(pre, 0, sizeof pre);
        memset(isc, 0, sizeof isc);
        dc = 0;
        for(int i = 1; i <= n; ++i) {
            if(!pre[i])
                dfs(i, -1);
        }
        memset(vis, 0, sizeof vis);
        dc = 0;
        for(int i = 1; i <= n; ++i) {
            if(!vis[i]) {
                ++dc;
                dfs1(i);
            }
        }
        for(int i = 1; i <= n; ++i) {
            for(int j = fst[i]; ~j; j = nxt[j]) {
                int v = vv[j];
                if(bcc[i] != bcc[v])
                    g[bcc[i]].push_back(bcc[v]);
            }
        }
        memset(vis, 0, sizeof vis);
        for(int i = 1; i <= dc; ++i) bcj[i] = i;
        for(int i = 1; i <= dc; ++i) {
            if(!vis[i]) {
                dfs2(i, -1, 0);
            }
        }
        lca_init();

        bool flag = 1;
        for(int i = 1; i <= q; ++i) {
            scanf("%d%d", &a[i], &b[i]);
            a[i] = bcc[a[i]];
            b[i] = bcc[b[i]];
        }
        memset(cnt, 0, sizeof cnt);
        for(int i = 1; i <= q; ++i) {

            if(find(a[i]) != find(b[i])) {
                flag = 0;
                break;
            }
            P[i] = lca(a[i], b[i]);
            cnt[P[i]]--;
            cnt[a[i]]++;
        }
        if(!flag) {
            puts("No");
            continue;
        }
        memset(vis, 0, sizeof vis);
        for(int i = 1; i <= dc; ++i) {
            if(!vis[i]) {
                dfs3(i, -1);
            }
        }
        memset(vis, 0,sizeof vis);
        for(int i = 1; i <= dc; ++i) {
            if(!vis[i]) {
                dfs4(i, -1);
            }
        }
        for(int i = 1; i <= q; ++i) {
            if(cnt[b[i]] - cnt[P[i]] > 0) {
                flag = 0;
                break;
            }
        }
        puts(flag? "Yes": "No");
    }
    return 0;
}


#include <iostream>
#include <cstring>
#include <string>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <stack>
#include <queue>
#include <map>
#include <vector>
#include <cstdlib>
#include <set>
using namespace std;

#define LL long long
#define N 200020
#define M 400020
#define eps 1e-8
#define MP make_pair
#define Pi acos(-1.0)
#pragma comment(linker, "/STACK:1024000000,1024000000")
#define inf 0x3f3f3f3f
#define ls (i << 1)
#define rs (ls | 1)
#define md ((ll + rr) >> 1)
#define lson ll, md, ls
#define rson md + 1, rr, rs
#define mod 1000000007

int fst[N], nxt[M], vv[M], e;
void init() {
    memset(fst, -1, sizeof fst);
    e = 0;
}
void add(int u, int v) {
    vv[e] = v, nxt[e] = fst[u], fst[u] = e++;
}
int n, nn, m, q;
int pre[N], dc;
bool isc[M];
bool vis[N];
int bcc[N];
int a[N], b[N], P[N];
int bcj[N];
int cnt[N];
vector<int> g[N];

int fa[22][N], dep[N];

int dfs(int u, int p) {
    int lowu = pre[u] = ++dc;

    for(int i = fst[u]; ~i; i = nxt[i]) {
        int v = vv[i];
        if(!pre[v]) {
            int lowv = dfs(v, u);
            if(lowv > pre[u]) {
                isc[i] = isc[i^1] = 1;
            }
            lowu = min(lowu, lowv);
        }
        else if(v != p) lowu = min(lowu, pre[v]);
    }
    return lowu;
}

void dfs1(int u) {
    bcc[u] = dc;
    vis[u] = 1;
    for(int i = fst[u]; ~i; i = nxt[i]) {
        int v = vv[i];
        if(isc[i] || vis[v]) continue;
        dfs1(v);
    }
}

int find(int x) {
    if(bcj[x] != x) return find(bcj[x]);
    return bcj[x];
}

void dfs2(int u, int p, int D) {
    dep[u] = D;
    fa[0][u] = p;
    vis[u] = 1;

    for(int i = 0; i < g[u].size(); ++i) {
        int v = g[u][i];
        if(v == p) continue;
        bcj[find(u)] = find(v);
        dfs2(v, u, D + 1);
    }
}

void lca_init() {
    for(int k = 0; k < 21; ++k) {
        for(int i = 1; i <= dc; ++i) {
            if(fa[k][i] == -1)
                fa[k+1][i] = -1;
            else
                fa[k+1][i] = fa[k][fa[k][i]];
        }
    }
}
int lca(int u, int v) {
    if(dep[u] > dep[v]) swap(u, v);

    for(int k = 0; k < 22; ++k) {
        if((dep[v] - dep[u]) >> k & 1)
            v = fa[k][v];
    }
    if(u == v) return u;
    for(int k = 21; k >= 0; --k) {
        if(fa[k][u] != fa[k][v])
            u = fa[k][u], v = fa[k][v];
    }
    return fa[0][u];
}
void dfs3(int u, int p) {
    vis[u] = 1;
    for(int i = 0; i < g[u].size(); ++i) {
        int v = g[u][i];
        if(v == p) continue;
        dfs3(v, u);
        cnt[u] += cnt[v];
    }
}
int main() {
    while(scanf("%d%d%d", &n, &m, &q) != EOF) {
        init();
        for(int i = 1; i <= m; ++i) {
            int u, v;
            scanf("%d%d", &u, &v);
            add(u, v);
            add(v, u);
        }
        fill(g + 1, g + n + 1, vector<int>());
        memset(pre, 0, sizeof pre);
        memset(isc, 0, sizeof isc);
        dc = 0;
        for(int i = 1; i <= n; ++i) {
            if(!pre[i])
                dfs(i, -1);
        }
        memset(vis, 0, sizeof vis);
        dc = 0;
        for(int i = 1; i <= n; ++i) {
            if(!vis[i]) {
                ++dc;
                dfs1(i);
            }
        }
        for(int i = 1; i <= n; ++i) {
            for(int j = fst[i]; ~j; j = nxt[j]) {
                int v = vv[i];
                if(bcc[i] != bcc[v])
                    g[bcc[i]].push_back(bcc[v]),
                    g[bcc[v]].push_back(bcc[i]);
            }
        }
        memset(vis, 0, sizeof vis);
        for(int i = 1; i <= dc; ++i) bcj[i] = i;
        for(int i = 1; i <= dc; ++i) {
            if(!vis[i]) {
                dfs2(i, -1, 0);
            }
        }
        lca_init();

        bool flag = 1;
        for(int i = 1; i <= q; ++i) {
            scanf("%d%d", &a[i], &b[i]);
            a[i] = bcc[a[i]];
            b[i] = bcc[b[i]];
        }
        for(int i = 1; i <= q; ++i) {

            if(find(a[i]) != find(b[i])) {
                flag = 0;
                break;
            }
            P[i] = lca(a[i], b[i]);
            cnt[a[i]]++;
            cnt[P[i]]--;
        }
        if(!flag) {
            puts("No");
            continue;
        }
        memset(vis, 0, sizeof vis);
        for(int i = 1; i <= dc; ++i) {
            if(!vis[i]) {
                dfs3(i, -1);
            }
        }
        for(int i = 1; i <= q; ++i) {
            if(cnt[b[i]] - cnt[P[i]] > 0) {
                flag = 0;
                break;
            }
        }
        puts(flag? "Yes": "No");
    }
    return 0;
}


#include <iostream>
#include <cstring>
#include <string>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <stack>
#include <queue>
#include <map>
#include <vector>
#include <cstdlib>
#include <set>
using namespace std;

#define LL long long
#define N 200020
#define M 400020
#define eps 1e-8
#define MP make_pair
#define Pi acos(-1.0)
#pragma comment(linker, "/STACK:1024000000,1024000000")
#define inf 0x3f3f3f3f
#define ls (i << 1)
#define rs (ls | 1)
#define md ((ll + rr) >> 1)
#define lson ll, md, ls
#define rson md + 1, rr, rs
#define mod 1000000007

int fst[N], nxt[M], vv[M], e;
void init() {
	memset(fst, -1, sizeof fst);
	e = 0;
}
void add(int u, int v) {
	vv[e] = v, nxt[e] = fst[u], fst[u] = e++;
}
int n, nn, m, q;
int pre[N], dc;
bool isc[M];
bool vis[N];
int bcc[N];
int a[N], b[N], P[N];
int bcj[N];
int cnt[N];
vector<int> g[N];

int fa[22][N], dep[N];

int dfs(int u, int p) {
	int lowu = pre[u] = ++dc;

	for(int i = fst[u]; ~i; i = nxt[i]) {
		int v = vv[i];
		if(!pre[v]) {
			int lowv = dfs(v, u);
			if(lowv > pre[u]) {
				isc[i] = isc[i^1] = 1;
			}
			lowu = min(lowu, lowv);
		}
		else if(v != p) lowu = min(lowu, pre[v]);
	}
	return lowu;
}

void dfs1(int u) {
	bcc[u] = dc;
	vis[u] = 1;
	for(int i = fst[u]; ~i; i = nxt[i]) {
		int v = vv[i];
		if(isc[i] || vis[v]) continue;
		dfs1(v);
	}
}

int find(int x) {
	if(bcj[x] != x) return find(bcj[x]);
	return bcj[x];
}

void dfs2(int u, int p, int D) {
	dep[u] = D;
	fa[0][u] = p;
	vis[u] = 1;

	for(int i = 0; i < g[u].size(); ++i) {
		int v = g[u][i];
		if(v == p) continue;
		bcj[find(u)] = find(v);
		dfs2(v, u, D + 1);
	}
}

void lca_init() {
	for(int k = 0; k < 21; ++k) {
		for(int i = 1; i <= dc; ++i) {
			if(fa[k][i] == -1)
				fa[k+1][i] = -1;
			else
				fa[k+1][i] = fa[k][fa[k][i]];
		}
	}
}
int lca(int u, int v) {
	if(dep[u] > dep[v]) swap(u, v);

	for(int k = 0; k < 22; ++k) {
		if((dep[v] - dep[u]) >> k & 1)
			v = fa[k][v];
	}
	if(u == v) return u;
	for(int k = 21; k >= 0; --k) {
		if(fa[k][u] != fa[k][v])
			u = fa[k][u], v = fa[k][v];
	}
	return fa[0][u];
}
void dfs3(int u, int p) {
	for(int i = 0; i < g[u].size(); ++i) {
		int v = g[u][i];
		if(v == p) continue;
		dfs3(v, u);
		cnt[u] += cnt[v];
	}
}
int main() {
	while(scanf("%d%d%d", &n, &m, &q) != EOF) {
		init();
		for(int i = 1; i <= m; ++i) {
			int u, v;
			scanf("%d%d", &u, &v);
			add(u, v);
			add(v, u);
		}
		fill(g + 1, g + n + 1, vector<int>());
		memset(pre, 0, sizeof pre);
		memset(isc, 0, sizeof isc);
		dc = 0;
		for(int i = 1; i <= n; ++i) {
			if(!pre[i])
				dfs(i, -1);
		}
		memset(vis, 0, sizeof vis);
		dc = 0;
		for(int i = 1; i <= n; ++i) {
			if(!vis[i]) {
				++dc;
				dfs1(i);
			}
		}
		for(int i = 1; i <= n; ++i) {
			for(int j = fst[i]; ~j; j = nxt[j]) {
				int v = vv[i];
				if(bcc[i] != bcc[v])
					g[bcc[i]].push_back(bcc[v]),
					g[bcc[v]].push_back(bcc[i]);
			}
		}
		memset(vis, 0, sizeof vis);
		for(int i = 1; i <= dc; ++i) bcj[i] = i;
		for(int i = 1; i <= dc; ++i) {
			if(!vis[i]) {
				dfs2(i, -1, 0);
			}
		}
		lca_init();

		bool flag = 1;
		for(int i = 1; i <= q; ++i) {
			scanf("%d%d", &a[i], &b[i]);
			a[i] = bcc[a[i]];
			b[i] = bcc[b[i]];
		}
		for(int i = 1; i <= q; ++i) {

			if(find(a[i]) != find(b[i])) {
				flag = 0;
				break;
			}
			P[i] = lca(a[i], b[i]);
			cnt[a[i]]++;
			cnt[P[i]]--;
		}
		if(!flag) {
			puts("No");
			continue;
		}
		memset(vis, 0, sizeof vis);
		for(int i = 1; i <= dc; ++i) {
			if(!vis[i]) {
				dfs3(i, -1);
			}
		}
		for(int i = 1; i <= q; ++i) {
			if(cnt[b[i]] - cnt[P[i]] > 0) {
				flag = 0;
				break;
			}
		}
		puts(flag? "Yes": "No");
	}
	return 0;
}


#include <iostream>
#include <cstring>
#include <string>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <stack>
#include <queue>
#include <map>
#include <vector>
#include <cstdlib>
#include <set>
using namespace std;

#define LL long long
#define N 200020
#define M 400020
#define eps 1e-8
#define MP make_pair
#define Pi acos(-1.0)
#pragma comment(linker, "/STACK:1024000000,1024000000")
#define inf 0x3f3f3f3f
#define ls (i << 1)
#define rs (ls | 1)
#define md ((ll + rr) >> 1)
#define lson ll, md, ls
#define rson md + 1, rr, rs
#define mod 1000000007

int fst[N], nxt[M], vv[M], e;
void init() {
    memset(fst, -1, sizeof fst);
    e = 0;
}
void add(int u, int v) {
    vv[e] = v, nxt[e] = fst[u], fst[u] = e++;
}
int n, nn, m, q;
int ae[N];
int pre[N], dc;
bool isc[M];
bool vis[N];
int bcc[N];
int a[N], b[N], P[N];
int bcj[N];
int cnt[N];
vector<int> g[N];

int fa[22][N], dep[N];

int dfs(int u, int p) {
    int lowu = pre[u] = ++dc;

    for(int i = fst[u]; ~i; i = nxt[i]) {
        int v = vv[i];
        if(!pre[v]) {
            ae[v] = i;
            int lowv = dfs(v, u);
            if(lowv > pre[u]) {
                isc[i] = isc[i^1] = 1;
            }
            lowu = min(lowu, lowv);
        }
        else if(ae[u] != -1 && (ae[u] ^ i) != 1) lowu = min(lowu, pre[v]);
    }
    return lowu;
}

void dfs1(int u) {
    bcc[u] = dc;
    vis[u] = 1;
    for(int i = fst[u]; ~i; i = nxt[i]) {
        int v = vv[i];
        if(isc[i] || vis[v]) continue;
        dfs1(v);
    }
}

int find(int x) {
    if(bcj[x] != x) bcj[x] = find(bcj[x]);
    return bcj[x];
}

void dfs2(int u, int p, int D) {
    dep[u] = D;
    fa[0][u] = p;
    vis[u] = 1;

    for(int i = 0; i < g[u].size(); ++i) {
        int v = g[u][i];
        if(v == p) continue;
        bcj[find(u)] = find(v);
        dfs2(v, u, D + 1);
    }
}

void lca_init() {
    for(int k = 0; k < 21; ++k) {
        for(int i = 1; i <= dc; ++i) {
            if(fa[k][i] == -1)
                fa[k+1][i] = -1;
            else
                fa[k+1][i] = fa[k][fa[k][i]];
        }
    }
}
int lca(int u, int v) {
    if(dep[u] > dep[v]) swap(u, v);

    for(int k = 0; k < 22; ++k) {
        if((dep[v] - dep[u]) >> k & 1)
            v = fa[k][v];
    }
    if(u == v) return u;
    for(int k = 21; k >= 0; --k) {
        if(fa[k][u] != fa[k][v])
            u = fa[k][u], v = fa[k][v];
    }
    return fa[0][u];
}
void dfs3(int u, int p) {
    vis[u] = 1;
    for(int i = 0; i < g[u].size(); ++i) {
        int v = g[u][i];
        if(v == p) continue;
        dfs3(v, u);
        cnt[u] += cnt[v];
    }
}
void dfs4(int u, int p) {
    vis[u] = 1;
    for(int i = 0; i < g[u].size(); ++i) {
        int v = g[u][i];
        if(v == p || vis[v]) continue;
        cnt[v] += cnt[u];
        dfs4(v, u);
    }
}
int main() {
    while(scanf("%d%d%d", &n, &m, &q) != EOF) {
        init();
        for(int i = 1; i <= m; ++i) {
            int u, v;
            scanf("%d%d", &u, &v);
            add(u, v);
            add(v, u);
        }
        memset(ae, -1, sizeof ae);
        fill(g + 1, g + n + 1, vector<int>());
        memset(pre, 0, sizeof pre);
        memset(isc, 0, sizeof isc);
        dc = 0;
        for(int i = 1; i <= n; ++i) {
            if(!pre[i])
                dfs(i, -1);
        }
        memset(vis, 0, sizeof vis);
        dc = 0;
        for(int i = 1; i <= n; ++i) {
            if(!vis[i]) {
                ++dc;
                dfs1(i);
            }
        }
        for(int i = 1; i <= n; ++i) {
            for(int j = fst[i]; ~j; j = nxt[j]) {
                int v = vv[j];
                if(bcc[i] != bcc[v])
                    g[bcc[i]].push_back(bcc[v]),
                    g[bcc[v]].push_back(bcc[i]);
            }
        }
        memset(vis, 0, sizeof vis);
        for(int i = 1; i <= dc; ++i) bcj[i] = i;
        for(int i = 1; i <= dc; ++i) {
            if(!vis[i]) {
                dfs2(i, -1, 0);
            }
        }
        lca_init();

        bool flag = 1;
        for(int i = 1; i <= q; ++i) {
            scanf("%d%d", &a[i], &b[i]);
            a[i] = bcc[a[i]];
            b[i] = bcc[b[i]];
        }
        for(int i = 1; i <= q; ++i) {

            if(find(a[i]) != find(b[i])) {
                flag = 0;
                break;
            }
            P[i] = lca(a[i], b[i]);
            cnt[P[i]]--;
            cnt[a[i]]++;
        }
        if(!flag) {
            puts("No");
            continue;
        }
        memset(vis, 0, sizeof vis);
        for(int i = 1; i <= dc; ++i) {
            if(!vis[i]) {
                dfs3(i, -1);
            }
        }
        memset(vis, 0,sizeof vis);
        for(int i = 1; i <= dc; ++i) {
            if(!vis[i]) {
                dfs4(i, -1);
            }
        }
        for(int i = 1; i <= q; ++i) {
            if(cnt[b[i]] - cnt[P[i]] > 0) {
                flag = 0;
                break;
            }
        }
        puts(flag? "Yes": "No");
    }
    return 0;
}


#include <iostream>
#include <cstring>
#include <string>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <stack>
#include <queue>
#include <map>
#include <vector>
#include <cstdlib>
#include <set>
using namespace std;

#define LL long long
#define N 200020
#define M 400020
#define eps 1e-8
#define MP make_pair
#define Pi acos(-1.0)
#pragma comment(linker, "/STACK:1024000000,1024000000")
#define inf 0x3f3f3f3f
#define ls (i << 1)
#define rs (ls | 1)
#define md ((ll + rr) >> 1)
#define lson ll, md, ls
#define rson md + 1, rr, rs
#define mod 1000000007

int fst[N], nxt[M], vv[M], e;
void init() {
    memset(fst, -1, sizeof fst);
    e = 0;
}
void add(int u, int v) {
    vv[e] = v, nxt[e] = fst[u], fst[u] = e++;
}
int n, nn, m, q;
int pre[N], dc;
bool isc[M];
bool vis[N];
int bcc[N];
int a[N], b[N], P[N];
int bcj[N];
int cnt[N];
vector<int> g[N];

int fa[22][N], dep[N];

int dfs(int u, int p) {
    int lowu = pre[u] = ++dc;

    for(int i = fst[u]; ~i; i = nxt[i]) {
        int v = vv[i];
        if(!pre[v]) {
            int lowv = dfs(v, u);
            if(lowv > pre[u]) {
                isc[i] = isc[i^1] = 1;
            }
            lowu = min(lowu, lowv);
        }
        else if(v != p) lowu = min(lowu, pre[v]);
    }
    return lowu;
}

void dfs1(int u) {
    bcc[u] = dc;
    vis[u] = 1;
    for(int i = fst[u]; ~i; i = nxt[i]) {
        int v = vv[i];
        if(isc[i] || vis[v]) continue;
        dfs1(v);
    }
}

int find(int x) {
    if(bcj[x] != x) return find(bcj[x]);
    return bcj[x];
}

void dfs2(int u, int p, int D) {
    dep[u] = D;
    fa[0][u] = p;
    vis[u] = 1;

    for(int i = 0; i < g[u].size(); ++i) {
        int v = g[u][i];
        if(v == p) continue;
        bcj[find(u)] = find(v);
        dfs2(v, u, D + 1);
    }
}

void lca_init() {
    for(int k = 0; k < 21; ++k) {
        for(int i = 1; i <= dc; ++i) {
            if(fa[k][i] == -1)
                fa[k+1][i] = -1;
            else
                fa[k+1][i] = fa[k][fa[k][i]];
        }
    }
}
int lca(int u, int v) {
    if(dep[u] > dep[v]) swap(u, v);

    for(int k = 0; k < 22; ++k) {
        if((dep[v] - dep[u]) >> k & 1)
            v = fa[k][v];
    }
    if(u == v) return u;
    for(int k = 21; k >= 0; --k) {
        if(fa[k][u] != fa[k][v])
            u = fa[k][u], v = fa[k][v];
    }
    return fa[0][u];
}
void dfs3(int u, int p) {
    vis[u] = 1;
    for(int i = 0; i < g[u].size(); ++i) {
        int v = g[u][i];
        if(v == p) continue;
        dfs3(v, u);
        cnt[u] += cnt[v];
    }
}
void dfs4(int u, int p, int c) {
    vis[u] = 1;
    cnt[u] += c;
    for(int i = 0; i < g[u].size(); ++i) {
        int v = g[u][i];
        if(v == p) continue;
        dfs4(v, u, cnt[u]);
    }
}
int main() {
    while(scanf("%d%d%d", &n, &m, &q) != EOF) {
        init();
        for(int i = 1; i <= m; ++i) {
            int u, v;
            scanf("%d%d", &u, &v);
            add(u, v);
            add(v, u);
        }
        fill(g + 1, g + n + 1, vector<int>());
        memset(pre, 0, sizeof pre);
        memset(isc, 0, sizeof isc);
        dc = 0;
        for(int i = 1; i <= n; ++i) {
            if(!pre[i])
                dfs(i, -1);
        }
        memset(vis, 0, sizeof vis);
        dc = 0;
        for(int i = 1; i <= n; ++i) {
            if(!vis[i]) {
                ++dc;
                dfs1(i);
            }
        }
        for(int i = 1; i <= n; ++i) {
            for(int j = fst[i]; ~j; j = nxt[j]) {
                int v = vv[j];
                if(bcc[i] != bcc[v])
                    g[bcc[i]].push_back(bcc[v]),
                    g[bcc[v]].push_back(bcc[i]);
            }
        }
        memset(vis, 0, sizeof vis);
        for(int i = 1; i <= dc; ++i) bcj[i] = i;
        for(int i = 1; i <= dc; ++i) {
            if(!vis[i]) {
                dfs2(i, -1, 0);
            }
        }
        lca_init();

        bool flag = 1;
        for(int i = 1; i <= q; ++i) {
            scanf("%d%d", &a[i], &b[i]);
            a[i] = bcc[a[i]];
            b[i] = bcc[b[i]];
        }
        for(int i = 1; i <= q; ++i) {

            if(find(a[i]) != find(b[i])) {
                flag = 0;
                break;
            }
            P[i] = lca(a[i], b[i]);
            cnt[a[i]]++;
            cnt[P[i]]--;
        }
        if(!flag) {
            puts("No");
            continue;
        }
        memset(vis, 0, sizeof vis);
        for(int i = 1; i <= dc; ++i) {
            if(!vis[i]) {
                dfs3(i, -1);
            }
        }
        memset(vis, 0,sizeof vis);
        for(int i = 1; i <= dc; ++i) {
            if(!vis[i]) {
                dfs4(i, -1, 0);
            }
        }
        for(int i = 1; i <= q; ++i) {
            if(cnt[b[i]] - cnt[P[i]] > 0) {
                flag = 0;
                break;
            }
        }
        puts(flag? "Yes": "No");
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define NMAX 200100
int num[NMAX];
int low[NMAX];
int par[NMAX][20];
int up[NMAX];
int down[NMAX];
int lv[NMAX];
int root[NMAX];
int findd(int x)
{
    //printf("find %d\n",x);
    if(root[x]==-1) return x;
    return root[x]=findd(root[x]);
}
void unionn(int x,int y)
{
    if(findd(x)==findd(y)) return ;
    root[findd(y)]=findd(x);
}
vector<int> a[200100];
vector<int> e;
int cnt=0;
void dfs(int x,int last)
{
    num[x]=low[x]=++cnt;
    //printf("%d %d %d %d\n",x,last,num[x],low[x]);
    for(int i=0;i<a[x].size();i++)
    {
        int y=e[a[x][i]]-x;
        if(y==last){last=0; continue;}
        if(!num[y])
        {
            dfs(y,x);
            low[x]=min(low[x],low[y]);
        }
        else
        {
            low[x]=min(low[x],num[y]);
        }
        if(low[y]<=num[x])
        unionn(x,y);
        else
        {
            par[findd(y)][0]=x;
        }
    }
}
bool cmp(int x,int y)
{
    return num[x]<num[y];
}
void init(int x)
{
    for(int j=1;j<=18;j++) par[x][j]=par[par[x][j-1]][j-1];
}
int goup(int x,int z)
{
    if(lv[x]<=lv[z]) return x;
    if(down[x])
    {
        printf("NO"); exit(0);
    }
    if(up[x])
    return goup(up[x],z);
    else return up[x]=goup(par[x][0],z);
}
int godown(int x,int z)
{
    if(lv[x]<=lv[z]) return x;
    if(up[x])
    {
        printf("NO"); exit(0);
    }
    if(down[x])
    return godown(down[x],z);
    else return down[x]=godown(par[x][0],z);
}
int lca(int x,int y)
{
    int i;
    if(lv[x]<lv[y]) swap(x,y);
    for(i=18;i>=0;i--)
    {
        if(lv[par[x][i]]>=lv[y]) x=par[x][i];
    }
    for(i=18;i>=0;i--)
    {
        if(x!=y) {x=par[x][i]; y=par[y][i];}
    }
    while(x!=y) {x=par[x][0]; y=par[y][0];} return x;
}
vector<int> nen;
int main()
{
    int n,m,q,i,j,x,y;
    //freopen("test.inp","r",stdin);
    memset(root,-1,sizeof root);
    scanf("%d %d %d",&n,&m,&q);
    for(i=0;i<m;i++)
    {
        scanf("%d %d",&x,&y);
        //printf("%d %d\n",x,y);
        e.push_back(x+y);
        a[x].push_back(i);
        a[y].push_back(i);
    }
    for(i=1;i<=n;i++) if(!num[i]) dfs(i,i);
    for(i=1;i<=n;i++) nen.push_back(i);
    sort(nen.begin(),nen.end(),cmp);
    for(i=0;i<n;i++)
    {
        int j=i; i=nen[i];
        //printf("start find %d\n",i);
        ////printf("%d %d\n",i,findd(i));
        if(lv[findd(i)]) {i=j;continue;}
        if(!par[findd(i)][0])  par[findd(i)][0]=n+1;
        par[findd(i)][0]=findd(par[findd(i)][0]); lv[findd(i)]=lv[par[findd(i)][0]]+1; init(i); i=j;
    }
    while(q--)
    {
        scanf("%d %d",&x,&y);
        x=findd(x); y=findd(y); if(x==y) continue;
        int z=lca(x,y);
        if(z==0)
        {
            printf("NO"); return 0;
        }
        goup(x,z);
        godown(y,z);
    }
    printf("YES");
}