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.util.concurrent.atomic.AtomicInteger;
import java.util.function.BiConsumer;

public class SPOJANDCC
{
	@SuppressWarnings("rawtypes")
	static InputReader in;
	static PrintWriter out;

	public static class BridgeTree
	{
		ArrayList<Integer> a[];
		boolean u[];
		int low[], dsu[], time = 0, comp[];
		HashSet<Long> set;

		BridgeTree(ArrayList<Integer> b[])
		{
			a = b;
			set = new HashSet<Long>();
			low = new int[b.length];
			dsu = new int[b.length];
			u = new boolean[b.length];
			comp = new int[b.length];
		}

		void Util(int v, int pre)
		{
			u[v] = true;
			low[v] = dsu[v] = time++;
			boolean m = false;
			for (int i : a[v])
			{
				if (i == pre && !m)
				{
					m = true;
					continue;
				}
				if (u[i])
					low[v] = Math.min(low[v], dsu[i]);
				else
				{
					Util(i, v);
					low[v] = Math.min(low[v], low[i]);
					if (low[i] > dsu[v])
					{
						int min = Math.min(i, v);
						int max = Math.max(i, v);
						long hh = min;
						hh <<= 32;
						hh |= max;
						set.add(hh);
					}
				}
			}
		}

		void BT()
		{
			for (int i = 0; i < a.length; i++)
				if (!u[i])
					Util(i, -1);
		}

		void dfs(int i)
		{
			u[i] = true;
			comp[i] = time;
			for (int j : a[i])
			{
				if (u[j])
					continue;
				int min = Math.min(i, j);
				int max = Math.max(i, j);
				long hh = min;
				hh <<= 32;
				hh |= max;
				if (set.contains(hh))
					continue;
				dfs(j);
			}
		}

		void BiconnectedComponents()
		{
			time = 0;
			Arrays.fill(u, false);
			for (int i = 0; i < a.length; i++)
				if (!u[i])
				{
					dfs(i);
					time++;
				}
		}

		void dfs2(ArrayList<Integer> b[], int n)
		{
			u[n] = true;
			for (int i : a[n])
			{
				if (u[i])
					continue;
				int min = Math.min(i, n);
				int max = Math.max(i, n);
				long hh = min;
				hh <<= 32;
				hh |= max;
				if (set.contains(hh))
				{
					b[comp[i]].add(comp[n]);
					b[comp[n]].add(comp[i]);
				}
				dfs2(b, i);
			}
		}

		ArrayList<Integer>[] BridgeT()
		{
			@SuppressWarnings("unchecked")
			ArrayList<Integer> b[] = new ArrayList[time + 1];
			for (int i = 0; i <= time; i++)
				b[i] = new ArrayList<Integer>();
			Arrays.fill(u, false);
			for (int i = 0; i < a.length; i++)
				if (!u[i])
					dfs2(b, i);
			return b;
		}
	}

	public static class LCA
	{
		int len;
		int[][] up;
		int[] tin;
		int[] tout;
		int time;
		boolean u[];

		void dfs(ArrayList<Integer>[] tree, int u, int p)
		{
			tin[u] = time++;
			up[0][u] = p;
			this.u[u] = true;
			for (int i = 1; i < len; i++)
				up[i][u] = up[i - 1][up[i - 1][u]];
			for (int v : tree[u])
				if (v != p)
					dfs(tree, v, u);
			tout[u] = time++;
		}

		public LCA(ArrayList<Integer>[] tree)
		{
			int n = tree.length;
			len = 1;
			while ((1 << len) <= n)
				++len;
			up = new int[len][n];
			tin = new int[n];
			tout = new int[n];
			u = new boolean[n];
			tin[0] = 0;
			tout[0] = Integer.MAX_VALUE - (int) 1e6;
			for (int i = 1; i < n; i++)
				if (!u[i])
					dfs(tree, i, 0);
		}

		boolean isParent(int parent, int child)
		{
			return tin[parent] <= tin[child] && tout[child] <= tout[parent];
		}

		public int lca(int a, int b)
		{
			if (isParent(a, b))
				return a;
			if (isParent(b, a))
				return b;
			for (int i = len - 1; i >= 0; i--)
				if (!isParent(up[i][a], b))
					a = up[i][a];
			return up[0][a];
		}

	}

	static int[] bb, cc;
	static boolean u[];

	static void dfs(ArrayList<Integer> b[], int i, int pre)
	{
		u[i] = true;
		for (int j : b[i])
		{
			if (j == pre)
				continue;
			dfs(b, j, i);
			bb[i] += bb[j];
			cc[i] += cc[j];
		}
	}

	static int aa[], len = 1;

	static void choise(ArrayList<Integer> a[], int i)
	{
		aa[i] = len;
		for (int j : a[i])
		{
			if (aa[j] > 0)
				continue;
			choise(a, j);
		}
	}

	static void solve()
	{
		int n = in.ni(), m = in.ni(), q = in.ni();
		@SuppressWarnings("unchecked")
		ArrayList<Integer> a[] = new ArrayList[n + 1];
		for (int i = 0; i <= n; i++)
			a[i] = new ArrayList<Integer>();
		while (m-- > 0)
		{
			int x = in.ni(), y = in.ni();
			a[x].add(y);
			a[y].add(x);
		}
		aa = new int[n + 1];
		for (int i = 1; i <= n; i++)
			if (aa[i] == 0)
			{
				choise(a, i);
				len++;
			}
		BridgeTree t = new BridgeTree(a);
		t.BT();
		t.BiconnectedComponents();
		ArrayList<Integer> b[] = t.BridgeT();
		// debug(b);
		int comp[] = t.comp;
		LCA l = new LCA(b);
		// debug(l.up);
		bb = new int[t.time + 1];
		cc = new int[t.time + 1];
		boolean v = true;
		while (q-- > 0)
		{
			int xx = in.ni(), yy = in.ni();
			if (aa[xx] != aa[yy])
			{
				out.println("No");
				return;
			}
			int x = comp[xx], y = comp[yy];
			int lca = l.lca(x, y);
			// debug(x + " " + y + " " + lca);
			bb[x]++;
			bb[lca]--;
			cc[lca]--;
			cc[y]++;
		}
		u = new boolean[bb.length];
		for (int i = 1; i < bb.length && v; i++)
			if (l.up[0][i] == 0)
				dfs(b, i, 0);
		for (int i = 1; i < bb.length && v; i++)
		{
			if (bb[i] > 0 && cc[i] > 0)
			{
				v = false;
				break;
			}
		}
		if (v)
			out.println("Yes");
		else
			out.println("No");
	}

	@SuppressWarnings("rawtypes")
	static void soln()
	{
		in = new InputReader(System.in);
		out = new PrintWriter(System.out);
		solve();
		out.flush();
	}

	static void debug(Object... o)
	{
		System.out.println(Arrays.deepToString(o));
	}

	public static void main(String[] args)
	{
		new Thread(null, new Runnable()
		{
			public void run()
			{
				try
				{
					soln();
				} catch (Exception e)
				{
					e.printStackTrace();
				}
			}
		}, "1", 1 << 26).start();
	}

	static class InputReader<SpaceCharFilter>
	{

		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, 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 ni()
		{
			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 nl()
		{
			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 int[] nextIntArray(int n)
		{
			int a[] = new int[n];
			for (int i = 0; i < n; i++)
			{
				a[i] = ni();
			}
			return a;
		}

		public long[] nextLongArray(int n)
		{
			long a[] = new long[n];
			for (int i = 0; i < n; i++)
			{
				a[i] = nl();
			}
			return a;
		}

		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 String nextLine()
		{
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do
			{
				res.appendCodePoint(c);
				c = snext();
			} while (!isEndOfLine(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;
		}

		private boolean isEndOfLine(int c)
		{
			return c == '\n' || c == '\r' || c == -1;
		}

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

	}
}