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.util.*;
import java.io.*;

public class Main {
	public static void main(String[] args) {
		InputReader in = new InputReader(System.in);
		PrintWriter out = new PrintWriter(System.out);
		TaskE solver = new TaskE();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskE {
	static int Time;
	static Vertex componentAssign;
	static Vertex[] Seq;
	static int totSeq;
	static Vertex[] tree;
	
	class Vertex {
		List<Edge> outgo = new ArrayList<>(1);
		Vertex component;
		Vertex biComponent = null;
		int enterTime = -1;
		int posInSeq = -1;
		int depth = -1;
		int knowUp = 0;
		boolean allUp = false;
		
		public int dfsForBridge(Edge forbidden) {
			component = componentAssign;
			enterTime = Time++;
			int low = enterTime;
			for (Edge e : outgo) {
				if (e != forbidden) {
					if (e.dest.enterTime == -1) {
						int anc = e.dest.dfsForBridge(e.rev);
						if (anc == e.dest.enterTime) {
							e.isBridge = true;
							e.rev.isBridge = true;
						}
						else low = Math.min(anc, low);
					}
					else low = Math.min(low, e.dest.enterTime);
				}
			}
			return low;
		}
		
		public void dfsForComponent() {
			biComponent = componentAssign;
			for (Edge e : outgo) {
				if (!e.isBridge && e.dest.biComponent == null) {
					e.dest.dfsForComponent();
				}
			}
		}
		
		public void dfsForLCA() {
			enterTime = Time++;
			posInSeq = totSeq;
			Seq[totSeq++] = this;
			for (Edge e : outgo) {
				if (e.dest.depth == -1) {
					e.dest.depth = depth + 1;
					e.dest.dfsForLCA();
					Seq[totSeq++] = this;
				}
			}
		}
		
		public boolean verify() {
			for (Edge e : outgo) {
				if (e.dest.depth > depth) {
					if (!e.dest.verify()) return false;
					if (e.dest.knowUp > 1) {
						if (knowUp > 0) {
							if (allUp != e.dest.allUp) return false;
						}
						knowUp = Math.max(knowUp, e.dest.knowUp - 1);
						allUp = e.dest.allUp;
					}
				}
			}
			return true;
		}
	}
	
	class Edge {
		boolean isBridge = false;
		Edge rev;
		Vertex dest;
	}
	
	public void addEdge(Vertex a, Vertex b) {
		Edge ab = new Edge();
		Edge ba = new Edge();
		ab.rev = ba;
		ab.dest = b;
		a.outgo.add(ab);
		ba.rev = ab;
		ba.dest = a;
		b.outgo.add(ba);
	}
	
	public void solve(int TestNumber, InputReader in, PrintWriter out) {
		int n = in.nextInt();
		int m = in.nextInt();
		int q = in.nextInt();
		Vertex[] v = new Vertex[n];
		for (int i = 0; i < n; ++i) {
			v[i] = new Vertex();
		}
		for (int i = 0; i < m; ++i) {
			Vertex a = v[in.nextInt()-1];
			Vertex b = v[in.nextInt()-1];
			addEdge(a,b);
		}
		
		Time = 0;
		for (Vertex vv : v) {
			if (vv.enterTime == -1) {
				componentAssign = new Vertex();
				vv.dfsForBridge(null);
			}
		}
		
		List<Vertex> biComp = new ArrayList<>();
		for (Vertex vv : v) {
			if (vv.biComponent == null) {
				componentAssign = new Vertex();
				biComp.add(componentAssign);
				vv.dfsForComponent();
			}
		}
		
		for (Vertex vv : v) {
			for (Edge e : vv.outgo) {
				if (vv.biComponent != e.dest.biComponent) {
					Edge ne = new Edge();
					ne.dest = e.dest.biComponent;
					vv.biComponent.outgo.add(ne);
				}
			}
		}
		
		Seq = new Vertex[2 * n + 10];
		totSeq = 0;
		Time = 1;//Time = 0;
		for (Vertex comp : biComp) {
			if (comp.depth == -1) {
				comp.depth = 0;
				comp.dfsForLCA();
			}
		}
		
		tree = new Vertex[4 * totSeq + 10];
		initTree(0, 0, totSeq - 1);
		for (int i = 0; i < q; ++i) {
			Vertex s = v[in.nextInt()-1];
			Vertex t = v[in.nextInt()-1];
			if (s.component != t.component) {
				out.println("No");
				return;
			}
			s = s.biComponent;
			t = t.biComponent;
			int l = Math.min(s.posInSeq, t.posInSeq);
			int r = Math.max(s.posInSeq, t.posInSeq);
			Vertex lca = getTree(0, 0, totSeq - 1, l, r);
			if (s.depth > lca.depth) {
				if (s.knowUp > 0 && !s.allUp) {
					out.println("No");
					return;
				}
				s.knowUp = Math.max(s.knowUp, s.depth - lca.depth);
				s.allUp = true;
			}
			if (t.depth > lca.depth) {
				if (t.knowUp > 0 && t.allUp) {
					out.println("No");
					return;
				}
				t.knowUp = Math.max(t.knowUp, t.depth - lca.depth);
				t.allUp = false;
			}
		}
		for (Vertex comp : biComp) {
			if (comp.depth == 0) {
				if (!comp.verify()) {
					out.println("No");
					return;
				}
			}
		}
		out.println("Yes");
	}
	
	public Vertex getTree(int root, int l, int r, int ql, int qr) {
		if (ql > qr) return null;
		if (ql == l && qr ==r) return tree[root];
		int mid = (l + r) >> 1;
		Vertex lc = getTree(root*2+1, l, mid, ql, Math.min(mid, qr));
		Vertex rc = getTree(root*2+2, mid+1, r, Math.max(mid+1, ql), qr);
		if (lc == null) return rc;
		if (rc == null) return lc;
		return (lc.enterTime < rc.enterTime) ? lc : rc;
	}
	
	public void initTree(int root, int l, int r) {
		if (l == r) {
			tree[root] = Seq[l];
		}
		else {
			int mid = (l+r) >> 1;
			initTree(root * 2 + 1, l, mid);
			initTree(root * 2 + 2, mid + 1, r);
			if (tree[root * 2 + 1].enterTime < tree[root * 2 + 2].enterTime) {
				tree[root] = tree[root * 2 + 1];
			}
			else {
				tree[root] = tree[root * 2 + 2];
			}
		}
	}
}

class InputReader {
	BufferedReader reader;
	StringTokenizer tokenizer;
	
	public InputReader(InputStream stream) {
		reader = new BufferedReader(new InputStreamReader(stream),32768);
		tokenizer = null;
	}
	
	public String next() {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}
	
	public int nextInt() {
		return Integer.parseInt(next());
	}
}

