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 *s*<sub class="lower-index">*i*</sub> to vertex *d*<sub class="lower-index">*i*</sub> 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.
The first line contains three integers *n*, *m* and *q* (1 ≤ *n*, *m*, *q* ≤ 2·10<sup class="upper-index">5</sup>) — the number of nodes, channels and important messages.

Next *m* lines contain two integers each, *v*<sub class="lower-index">*i*</sub> and *u*<sub class="lower-index">*i*</sub> (1 ≤ *v*<sub class="lower-index">*i*</sub>, *u*<sub class="lower-index">*i*</sub> ≤ *n*, *v*<sub class="lower-index">*i*</sub> ≠ *u*<sub class="lower-index">*i*</sub>), that means that between nodes *v*<sub class="lower-index">*i*</sub> and *u*<sub class="lower-index">*i*</sub> is a channel. Between a pair of nodes can exist more than one channel.

Next *q* lines contain two integers *s*<sub class="lower-index">*i*</sub> and *d*<sub class="lower-index">*i*</sub> (1 ≤ *s*<sub class="lower-index">*i*</sub>, *d*<sub class="lower-index">*i*</sub> ≤ *n*, *s*<sub class="lower-index">*i*</sub> ≠ *d*<sub class="lower-index">*i*</sub>) — 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.
import sys

MOD = 1000000007
EPS = 1e-9
INF = 2117117117
LLINF = 2117117117117117117
MAXN = 500117
MAXLN = 20
PI = 3.141592653589793

def make_pair(a, b):
    return (a, b)

def push_back(a, x):
    a.append(x)

def sqr(a):
    return a * a

def sz(a):
    return len(a)

def compress(u, cid):
    global h, comp2, fup, d, p, gt, cn
    h[u] = True
    comp2[u] = cid
    for v in g[u]:
        if h[v]:
            continue
        if fup[v] > d[u]:
            push_back(gt[comp2[u]], cn)
            p[0][cn] = cid
            compress(v, cn)
            cn += 1
        else:
            compress(v, comp2[u])

def build_lca(v, par, depth):
    global timer, d, p, gt, tin, tout
    tin[v] = timer
    timer += 1
    d[v] = depth
    p[0][v] = par
    i = 1
    while i < MAXLN:
        p[i][v] = p[i - 1][p[i - 1][v]]
        i += 1
    for u in gt[v]:
        build_lca(u, v, d[v] + 1)
    tout[v] = timer
    timer += 1

def is_par(v, u):
    return tin[v] < tin[u] and tout[u] < tout[v]

def get_lca(v, u):
    if is_par(v, u):
        return v
    if is_par(u, v):
        return u
    i = MAXLN - 1
    while i >= 0:
        if not is_par(p[i][v], u):
            v = p[i][v]
        i -= 1
    return p[0][v]

def dfs(v):
    global qv, d, gt
    dir = -1
    up = d[p[0][v]]
    for qq in qv[v]:
        if dir == -1:
            dir = qq[0]
            up = qq[1]
        elif dir == qq[0]:
            up = min(up, qq[1])
        else:
            print("No")
            sys.exit(0)
    for u in gt[v]:
        tmp = dfs(u)
        dir_u = tmp[0]
        up_u = tmp[1]
        if up_u < d[v]:
            if dir == -1:
                dir = dir_u
                up = up_u
            elif dir == dir_u:
                up = min(up, up_u)
            else:
                print("No")
                sys.exit(0)
    return (dir, up)

n, m, q = map(int, input().split())
g = [[] for _ in range(MAXN)]
gt = [[] for _ in range(MAXN)]
qa = []
for _ in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    push_back(g[a], b)
    push_back(g[b], a)
for _ in range(q):
    v, u = map(int, input().split())
    v -= 1
    u -= 1
    qa.append(make_pair(v, u))

h = [False] * MAXN
d = [0] * MAXN
fup = [0] * MAXN
comp = [0] * MAXN
comp2 = [0] * MAXN
p = [[0] * MAXN for _ in range(MAXLN)]
timer = 0
tin = [0] * MAXN
tout = [0] * MAXN

cn = 0
for i in range(n):
    if not h[i]:
        calc(i, cn)
        cn += 1

h = [False] * MAXN
cn = 0
for i in range(n):
    if d[i] == 0:
        p[0][cn] = cn
        compress(i, cn)
        cn += 1

timer = 0
for i in range(cn):
    if p[0][i] == i:
        build_lca(i, i, 0)

for i in range(q):
    v = qa[i][0]
    u = qa[i][1]
    if comp[v] != comp[u]:
        print("No")
        sys.exit(0)
    v = comp2[v]
    u = comp2[u]
    if v == u:
        continue
    l = get_lca(v, u)
    if v != l:
        push_back(qv[v], make_pair(0, d[l]))
    if u != l:
        push_back(qv[u], make_pair(1, d[l]))

for i in range(cn):
    if d[i] == 0:
        dfs(i)

print("Yes")
