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

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

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

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

Input

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

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

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

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

Output

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

Examples

Input

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


Output

Yes


Input

3 2 2
1 2
3 2
1 3
2 1


Output

No


Input

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


Output

Yes

Note

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

In the third sample test you can assign directions, for example, as follows: 1 → 2, 2 → 1, 2 → 3. Then the path for the first message will be 1 → 2 → 3, and for the second one — 2 → 1.
import java.io.*;
import java.util.*;
import java.math.*;


public class caseofcomputernetworkd {
	static int n,m,q;
	static ArrayList<Edge> g[];
	static int time=0;
	static int[] low,disc;
	static boolean[] isbridge;
	static boolean[] visited;
	static int[] parent;
	static ArrayList<Integer> btree[];
	static int compno=0;
	static int[] bcom;
	static int[] level;
	static int[][] DP;
	static int[] up,down;
	static boolean ok;
	static int[] set,arr;
	
	public static void main(String[] ags)
	{
		InputReader in=new InputReader(System.in);
		PrintWriter pw=new PrintWriter(System.out);
		n=in.nextInt();
		m=in.nextInt();
		q=in.nextInt();
		set=new int[n];
		DP=new int[n][20];
		bcom=new int[n];
		level=new int[n];
		arr=new int[n];
		visited=new boolean[n];
		g=new ArrayList[n];
		parent=new int[n];
		disc=new int[n];
		low=new int[n];
		up=new int[n];
		down=new int[n];
		btree=new ArrayList[n];
		for(int i=0;i<n;i++)
		{
			g[i]=new ArrayList<Edge>();
			btree[i]=new ArrayList<Integer>();
		}
		isbridge=new boolean[m];
		
		
		for(int i=0;i<m;i++)
		{
			int u=in.nextInt()-1;
			int v=in.nextInt()-1;
			Edge temp=new Edge(u,v,i);
			g[u].add(temp);
			g[v].add(temp);
			
		}
		for(int i=0;i<n;i++)
		{
			if(!visited[i])
			{
				dfs0(i,-1);
				compno++;
			}
		}
		compno=0;
		time=0;
		
		Arrays.fill(visited, false);
		for(int i=0;i<n;i++)
		{
			if(!visited[i])
			{
				dfs1(i);
				compno++;
			}
		}
//		System.out.println(compno);
//		for(int i=0;i<m;i++)
//		{
//			System.out.println(isbridge[i]);
//		}
//		for(int i=0;i<n;i++)
//		{
//			System.out.println(low[i]+" "+disc[i]);
//		}
		Arrays.fill(visited, false);
		for(int i=0;i<compno;i++)
		{
			if(!visited[i])
			{
				DP[i][0]=i;
				dfs2(i);
	
			}
		}
		for(int j=1;j<20;j++)
		{
			for(int i=0;i<compno;i++)
			{
				DP[i][j]=DP[DP[i][j-1]][j-1];
			}
		}
//		for(int i=0;i<n;i++)
//		{
//			System.out.println(btree[i].toString());
//		}
		while(q-->0)
		{
			int u=in.nextInt()-1;
			int v=in.nextInt()-1;
			if(set[u]!=set[v])
			{
				System.out.println("No");
				System.exit(0);
			}
			else
			{
				u=bcom[u];
				v=bcom[v];
				if(u!=v)
				{
					up[u]++;
					down[v]++;
					int ll=lca(u,v);
//					System.out.println("ll is "+ll);
					up[ll]--;
					down[ll]--;
				}
			}
		}
		ok=true;
		Arrays.fill(visited, false);
		for(int i=0;i<compno;i++)
		{
			if(!visited[i])
			{
				dfs3(i);
			}
		}
		if(ok)
		{
			pw.println("Yes");
		}
		else
		{
			pw.println("No");
		}
		
		
		
		pw.close();
	}
	static void dfs3(int u)
	{
		visited[u]=true;
		for(int i=0;i<btree[u].size();i++)
		{
			int v=btree[u].get(i);
			if(!visited[v])
			{
				dfs3(v);
				up[u]+=up[v];
				down[u]+=down[v];
			}
		}
		if(up[u]>0 && down[u]>0)
		{
			ok=false;
		}
	}
	static int lca(int a,int b)
	{
		if(level[a]>level[b])
		{
			int c=a;
			a=b;
			b=c;
		}
			
		int d = level[b]-level[a];
		for(int i=0;i<20;i++)
			if(((1<<i)&d)>0)
				b = DP[b][i];
		if(a==b)
			return a;
		for(int i=20-1;i>=0;i--)
			if(DP[a][i]!=DP[b][i])
			{
				a = DP[a][i];
				b = DP[b][i];
			}
		return DP[a][0];
	}
	static void dfs2(int u)
	{
		visited[u]=true;
		for(int i=0;i<btree[u].size();i++)
		{
			int w=btree[u].get(i);
			if(!visited[w])
			{
				level[w]=level[u]+1;
				DP[w][0]=u;
				dfs2(w);
			}
		}
	}
	
	//building bridge tree
	public static void dfs1(int u)
	{
		Queue<Integer> q=new LinkedList<Integer>();
		q.add(u);
		visited[u]=true;
		int current=compno;
		while(!q.isEmpty())
		{
			int v=q.remove();
			for(int i=0;i<g[v].size();i++)
			{
				Edge e=g[v].get(i);
				bcom[v]=current;
				int w=e.get(v);
				if(visited[w])continue;
				if(isbridge[e.index])
				{
					compno++;
					btree[current].add(compno);
					btree[compno].add(current);
					dfs1(w);
				}
				else
				{
					q.add(w);
					visited[w]=true;
				}
			}
		}
		
	}
	//finding bridge edges in tree
	public static int dfs0(int u,int e)
	{
		visited[u]=true;
		set[u]=compno;
		arr[u]=time++;
		int dbe=arr[u];
		for(int i=0;i<g[u].size();i++)
		{
			Edge t=g[u].get(i);
			int w=t.get(u);
			if(!visited[w])
			{
				dbe=Math.min(dbe, dfs0(w,t.index));
			}
			else if(e!=t.index)
			{
				dbe=Math.min(dbe, arr[w]);
			}
		}
		if(dbe==arr[u] && e!=-1)
		{
			isbridge[e]=true;
		}
		return dbe;
		
	}

	
	
	

	static class Edge
	{
		int index,u,v;
		public  Edge(int u,int v,int i)
		{
			this.u=u;
			this.v=v;
			this.index=i;
		}
		public int get(int x)
		{
			if(x==u)
			{
				return v;
			}
			return u;
		}
	}
	public static int[] readint(InputReader in,int n)
	{
		int[] a=new int[n];
		for(int i=0;i<n;i++)
		{
			a[i]=in.nextInt();
		}
		return a;
	}
	public static long[] readlong(InputReader in,int n)
	{
		long[] a=new long[n];
		for(int i=0;i<n;i++)
		{
			a[i]=in.nextLong();
		}
		return a;
	}
	public static void addhm(HashMap<Integer,Integer> hm,int k)
	{
		int cc=0;
		if(hm.containsKey(k))
		{
			cc=hm.get(k);
		}
		hm.put(k, cc+1);
	}
	public static void removehm(HashMap<Integer,Integer> hm,int k)
	{
		int cc=hm.get(k);
		if(cc==1)
		{
			hm.remove(k);
		}
		else
		{
			hm.put(k,cc-1);
		}
	}
	
	static class InputReader {

		private InputStream stream;
		private byte[] buf = new byte[8192];
		private int curChar;
		private int snumChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int snext() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}

			int res = 0;

			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));

			return res * sgn;
		}
		
		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}

			long res = 0;

			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));

			return res * sgn;
		}
		
		public String readString() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}

}
