Harryxun/stf_run huggingface dataset:
n = int(input())
for i in range(n):
  x1, y1, x2, y2, x3, y3, x4, y4 = [float(j) for j in input().split()]
  if x2 - x1 == 0.0:
    if x4 - x3 == 0.0:
      print("YES")
    else:
      print("NO")
  print("YES" if (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3) else "NO")

### FIXED CODE ###

n = int(input())
for i in range(n):
  x1, y1, x2, y2, x3, y3, x4, y4 = [float(j) * 10**10 for j in input().split()]
  if x2 == x1:
    if x4 == x3:
      print("YES")
    else:
      print("NO")
  elif x4 == x3:
    print("NO")
  else:
    print("YES" if (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3) else "NO")
import math
N,K=map(int,input().split())

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1,K+1):
    print((combinations_count(N-K+1,i)%1000000007)*(combinations_count(K-1,i-1)%1000000007)%1000000007)

### FIXED CODE ###

import math
N,K=map(int,input().split())

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1,K+1):
    if i>min(K,N-K+1):print(0)
    else:print(((combinations_count(N-K+1,i))*(combinations_count(K-1,i-1)))%1000000007)
b = map(int,[input()  for _ in range(3)])
total= 0
ans = 0
for i in range(1,N+1):
    st_i = str(i)
    for j in range(4):
        try:
            total += int(st_i[j])
        except:
            pass


    if a <= total <= b:
        ans += i
    total = 0

print(ans)

### FIXED CODE ###

N,a,b = map(int,input().split(" "))
total= 0
ans = 0
for i in range(1,N+1):
    st_i = str(i)
    for j in range(4):
        try:
            total += int(st_i[j])
        except:
            pass


    if a <= total <= b:
        ans += i
    total = 0

print(ans)
a, b, x = map(int, input().split())

def f(n):
    if n = -1:
        return 0
    return n // x

print(f(b)-f(a-1))

### FIXED CODE ###

a, b, x = map(int, input().split())

def f(n):
    if n == -1:
        return 0
    return n // x + 1

print(f(b)-f(a-1))
n = input()
l = len(n)-1

for i in range(2**l):
    op = ["-"]*l
    for j in range(l):
        if (i>>j) &1:
            op[i-j-1]="+"
    formula = ""
    for op_num,op_l in zip(n,op+[""]):
        formula += op_num+op_l
        if eval(formula)==7:
            print(formula+"=7")
            break

### FIXED CODE ###

def dfs(i, Str, res):
    if i==3:
        if res==7:
            print(Str+"=7")
            exit()
        return
    
    dfs(i+1,Str+"+"+s[i+1],res+int(s[i+1]))
    dfs(i+1,Str+"-"+s[i+1],res-int(s[i+1]))

s=input()
dfs(0,s[0],int(s[0]))
s = input()
ans = []
cnt = 0

for i in range(len(s)):
    for j in range(2, len(s) + 1):
        memo = s[i:j]
        for k in range(len(memo)):
            if memo[k] == 'A' or memo[k] == 'C' or memo[k] == 'T' or memo[k] == 'G':
                cnt += 1
            else:
                break

        ans.append(cnt)
        cnt = 0

print(max(ans))


### FIXED CODE ###

S = input()
n = 0
atgc = [0] * len(S)

for i in S:
    if ('A' in i) or ('C' in i) or ('G' in i) or ('T' in i):
        atgc[n] += 1
    else:
        n += 1
        
ans = max(atgc)
print(ans)
n, k = map(int, input().split())
h_list = []
for i in range(n):
    h_list.append(int(input()))
h_list.sort()
min = 10**10
for j in range(n-k+1):
    if min > h_list[j+2] - h_list[j]:
        min = h_list[j+2] - h_list[j]

print(min)

### FIXED CODE ###

n, k = map(int, input().split())
h_list = []
for i in range(n):
    h_list.append(int(input()))
h_list.sort()
min = h_list[-1]
for j in range(n-k+1):
    if min > h_list[j+k-1] - h_list[j]:
        min = h_list[j+k-1] - h_list[j]

print(min)
import numpy as np
N, C = map(int,input().split())
T1 = [[] for _ in range(C)]
for _ in range(N):
    s, t, c = map(int,input().split())
    T1[c-1].append([s,t])
for i in range(C):
    T1[i].sort()
T2 = [[] for _ in range(C)]
for i in range(C):
    for s, t in T1[i]:
        if len(T2[i]) != 0 and T2[i][-1][1] == s:
            T2[i][-1][1] = t
        else:
            T2[i].append([s,t])
L = np.zeros(10 ** 5 + 1, int)
for i in range(C):
    for time in T2[i]:
        L[time[0]-1] += 1a
        L[time[1]+1] -= 1

ans = L.cumsum().max()
print(ans)

### FIXED CODE ###

import numpy as np
N, C = map(int,input().split())
T1 = [[] for _ in range(C)]
for _ in range(N):
    s, t, c = map(int,input().split())
    T1[c-1].append([s,t])
for i in range(C):
    T1[i].sort()
T2 = [[] for _ in range(C)]
for i in range(C):
    for s, t in T1[i]:
        if len(T2[i]) != 0 and T2[i][-1][1] == s:
            T2[i][-1][1] = t
        else:
            T2[i].append([s,t])

L = np.zeros(10 ** 5 + 2, int)
for i in range(C):
    for time in T2[i]:
        L[time[0]] += 1
        L[time[1]+1] -= 1

ans = L.cumsum().max()

print(ans)
a, b = map(int, input().split)
if a > b:
    print("a > b")
elif a == b:
    print("a == b")
else:
    print("a < b")

### FIXED CODE ###

a, b = map(int, input().split())
if a > b:
    print("a > b")
elif a == b:
    print("a == b")
else:
    print("a < b")
def fib(n):
  if n == 1:
    return 1
  else:
    return fib(n-1)*n

n,k = map(int, input().split())
print(int(fib(k)/fib(k-n)))

### FIXED CODE ###

n,k = map(int, input().split())
p=k
for i in range(n-1):
  p *= k-1
print(p)
n,k = list(map(int, input().split()))
h = list(map(int, input().split()))

cnt = 0
for i in range(k):
    if h[i] >= k:
        cnt += 1
print(cnt)



### FIXED CODE ###


n,k = list(map(int, input().split()))
h = list(map(int, input().split()))

cnt = 0
for i in range(n):
    if h[i] >= k:
        cnt += 1
print(cnt)
print("win") if sum(map(int,input())) < 22 else print("bust")

### FIXED CODE ###

print("win") if sum(list(map(int, input().split()))) < 22 else print("bust")
n, k = map( int, input().split() )
a = [ int( i ) for i in input().split() ]

leg = [ 0 ] * n
leg[ 0 ] = 1

p = 0
city_old = 1
for x in range( k ):
    city_new = a[ city_old-1 ]
    if leg[ city_new-1 ] == 0:
        leg[ city_new-1 ] += x + 1
    else:
        loop = x + 1 - leg[ city_new-1 ]
        modk = ( k - ( x + 1 ) ) % loop
        break
    city_old = city_new
    p += 1

if p == k:
    print( city_old )
    exit()


city_old = city_new
for x in range( modk ):
    city_new = a[ city_old-1 ]
    city_old = city_new

print( city_old )


### FIXED CODE ###

n, k = map( int, input().split() )
a = [ int( i ) for i in input().split() ]

leg = [ 0 ] * n
leg[ 0 ] = 0

p = 0
city_old = 1
for x in range( k ):
    city_new = a[ city_old-1 ]
    if leg[ city_new-1 ] == 0 and city_new != 1:
        leg[ city_new-1 ] = x + 1
    else:
        loop = x + 1 - leg[ city_new-1 ]
        modk = ( k - ( x + 1 ) ) % loop
#        print( loop, modk )
        break
    city_old = city_new
    p += 1

if p == k:
    print( city_old )
    exit()


city_old = city_new
for x in range( modk ):
    city_new = a[ city_old-1 ]
    city_old = city_new

print( city_old )
while True:
        a,op,b=map(input().split())
        a=int(a)
        b=int(b)
            
        if '?' in op: break
        print(eval(a+op+b))


### FIXED CODE ###



while 1:
     s=input()
     if '?' in s: break
     print(int(eval(s)))
import math

data = list(map(int, input().split()))
A, B = data[0], data[1]
gcd = math.gcd(A, B)
lcd = A*B//gcd
print(lcd)

### FIXED CODE ###

data = list(map(int, input().split()))
A, B = data[0], data[1]

def gcd(A, B):
    x = max(A, B)
    y = min(A, B)
    if x % y == 0:
        return y
    else:
        while x % y != 0:
            z = x % y
            x = y
            y = z
        else:
            return z

def lcd(A, B):
    return A * B // gcd(A, B)

print(lcd(A, B))
import numpy as np
x1_, y_1, x_2, y_2 = map(int, input().split())

x_4 = x_1 - (y_2 - y_1)
y_4 = y_1 + (x_2 - x_1)
x_3 = x_4 - (y_1 - y_4)
y_3 = y_4 + (x_1 - x_4)
 
print(x_3, y_3, x_4, y_4)

### FIXED CODE ###

x_1, y_1, x_2, y_2 = map(int, input().split())

x_4 = x_1 - (y_2 - y_1)
y_4 = y_1 + (x_2 - x_1)
x_3 = x_4 - (y_1 - y_4)
y_3 = y_4 + (x_1 - x_4)
 
print(x_3, y_3, x_4, y_4)
N,K = map(int, input().split())
A = [int(i) for i in input().split()]

l=[]
for i in range(N+1):
  l.append(A.count(i))

ls = sorted(l,reverse=True)

j= K
ans = 0
while ls[j] != 0:
  ans += ls[j]

print(ans)

### FIXED CODE ###

s = input()
N = [int(s[i:i+1]) for i in range(len(s))]
count = 0
for i in range(len(N)):
  if N[i] == 1:
    count += 1
  else:
    pass 
print(count)
a = 0
count = 0
while count < int(input())+1:
  b = int(input())
  a += 1/b
  count +=1
c = 1/a
print(c)

### FIXED CODE ###

a = 0
b = int(input())
c = list(map(int,input().split()))
for i in range(b):
  a += 1/c[i]
b = 1/a
print(b)
# -*- coding: utf-8 -*-

import sys


#for line in ["0.0 3.0 -1.0 0.0 -3.0 4.0"]: # expected [-2.000, 2.000, 2.236]
lineNumber = 0
for line in sys.stdin.readlines():
    lineNumber += 1

    # get data
    List = map(float, line.strip().split())

    # initial parameter
    if lineNumber == 1:
        w = List[0]
        array = [i for i in xrange(1, w+1)]
        contiune
    if lineNumber == 2: continue

    # set data
    [a, b] = List
    a -= 1; b -= 1

    # exchange
    buf = array[a]
    array[a] = array[b]
    array[b] = buf
    
for i in xrange(w):
    print array[i]
    
    

### FIXED CODE ###

# -*- coding: utf-8 -*-

import sys


lineNumber = 0
#for line in [ "5", "4", "2,4", "3,5", "1,2", "3,4" ]:
for line in sys.stdin.readlines():
    lineNumber += 1

    # get data
    List = map(int, line.strip().split(","))

    # initial parameter
    if lineNumber == 1:
        w = List[0]
        array = [i for i in xrange(1, w+1)]
        continue
    if lineNumber == 2: continue

    # set data
    [a, b] = List
    a -= 1; b -= 1

    # exchange
    buf = array[a]
    array[a] = array[b]
    array[b] = buf
    
for i in xrange(w):
    print array[i]
N, M = map(int, input().split())
a = [int(input()) for i in range(M)]
div = 1000000007

a.sort()
A = [0]*(N+1)
A[0] = 1

flag = True
for i in range(1, N+1):
  if flag and i == a[0]:
    A[i] = 0
    a.remove(i)
    if len(a)==0: flag = False
  else:
    if i==1: A[i] = 1
    else:
      A[i] = (A[i-1] + A[i-2])%div

print(A[N])

### FIXED CODE ###

N, M = map(int, input().split())
a = [int(input()) for i in range(M)]
div = 1000000007

a.sort()
A = [0]*(N+1)
A[0] = 1

flag = True
if M==0: flag = False

for i in range(1, N+1):
  if flag and i == a[0]:
    A[i] = 0
    a.remove(i)
    if len(a)==0: flag = False
  else:
    if i==1: A[i] = 1
    else:
      A[i] = (A[i-1] + A[i-2])%div

print(A[N])
N,M = map(int,input().split())
ans = {i:0 for i in range(1,N+1)}
ans[1] = 10000000
route = {i:[] for i in range(1,N+1)}
for _ in range(M):
    a,b = map(int,input().split())
    route[a].append(b)
    route[b].append(a)
x = [1]
for _ in range(M):
    for i in x:
        tmp = []
        for j in route[i]:
            #print(j)
            count = 0
            if ans[j] == 0:
                ans[j] = i
                count += 1
            tmp.append(j)
    x = tmp
    #print(ans,x)
    if count = 0:
        break
print('Yes')
for i in ans.keys():
    if i != 1:
        print(ans[i])

### FIXED CODE ###

N,M = map(int,input().split())
ans = {i:0 for i in range(1,N+1)}
ans[1] = 10000000
route = {i:set() for i in range(1,N+1)}
for _ in range(M):
    a,b = map(int,input().split())
    route[a].add(b)
    route[b].add(a)
x = {1}
for _ in range(N+1):
    tmp = set()
    count = 0
    for i in x:
        for j in route[i]:
            #print(j)
            if ans[j] == 0:
                ans[j] = i
                count += 1
                tmp.add(j)
    x = tmp
    #print(ans,x)
    if count == 0:
        break
check = 0
for i in ans.keys():
    if i != 1:
        if ans[i] == 0:
            check = 1
if check == 1:
    print('No')
else:
    print('Yes')
    for i in ans.keys():
        if i != 1:
            print(ans[i])
string = input()

def palindrome(inp):
  if inp == inp[::-1]: return True
  else: return False
  
if palindrome(string) and palindrome(string[:int((len(string) + 1)/2)] and palindrome(string[int((len(string) +3)/2):]: print("Yes")
else: print("No")

### FIXED CODE ###

string = input()

def palindrome(inp):
  if inp == inp[::-1]: return True
  else: return False

if palindrome(string) and palindrome(string[:int((len(string) -1)/2)]) and palindrome(string[int((len(string) +1)/2):]): print("Yes")
else: print("No")
print("Yes)

### FIXED CODE ###

n,a,b,c,d=map(int,input().split())
s=input()
for i in range(a,d-1):
	if s[i]==s[i+1]=="#":
		print("No")
		exit()
three=0
s="#"+s+"#"
for i in range(b,d+1):
	if s[i]==s[i+1]==s[i-1]==".":
		three=True
if c<d:
	print("Yes")
elif three==True:
	print("Yes")
else:
	print("No")
import sys
x,k,d=map(int,input().split())

x=abs(x)

a=x//d

if a>=k:
    ans=x-k*d

elif (k-a)%2==0:
    ans=x-d*m

else:
    ans=x-d*m-d

print(abs(ans)

### FIXED CODE ###

import sys
x,k,d=map(int,input().split())

x=abs(x)

a=x//d

if a>=k:
    ans=x-k*d

elif (k-a)%2==0:
    ans=x-d*a

else:
    ans=x-d*a-d

print(abs(ans))
import sys
import numpy as np
from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall, csgraph_to_dense
from scipy.sparse import issparse
sys.setrecursionlimit(10**7)

n, m, l = [int(i) for i in sys.stdin.readline().split()]
graph = [[0 for i in range(n)] for j in range(n)]
for i in range(m):
    a, b, c = [int(i) for i in sys.stdin.readline().split()]
    a -= 1
    b -= 1
    graph[a][b] = c
    graph[b][a] = c

res = floyd_warshall(csgraph_from_dense(graph))
if issparse(res):
    res = csgraph_to_dense(res)
res = np.where(res <= l, np.ones_like(res), np.zeros_like(res))
new_res = floyd_warshall(csgraph_from_dense(res))
new_res[new_res == np.inf] = 0
q = int(input())
for j in range(q):
    s, t = [int(i) for i in sys.stdin.readline().split()]
    s -= 1
    t -= 1
    dis = new_res[s, t]
    print(int(dis) - 1)

### FIXED CODE ###

import sys
import numpy as np
from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall, csgraph_to_dense
from scipy.sparse import issparse
sys.setrecursionlimit(10**7)

n, m, l = [int(i) for i in sys.stdin.readline().split()]
graph = [[0 for i in range(n)] for j in range(n)]
for i in range(m):
    a, b, c = [int(i) for i in sys.stdin.readline().split()]
    a -= 1
    b -= 1
    graph[a][b] = c
    graph[b][a] = c

res = floyd_warshall(csgraph_from_dense(graph))
if issparse(res):
    res = csgraph_to_dense(res)
res = np.where(res <= l, 1, 0)
new_res = floyd_warshall(res)
new_res[new_res == np.inf] = 0
q = int(input())
for j in range(q):
    s, t = [int(i) for i in sys.stdin.readline().split()]
    s -= 1
    t -= 1
    dis = new_res[s, t]
    print(int(dis) - 1)
n = list(input())
print("Yes" if min(len(set(n[:3])), len(set(n[1:])) == 1 else "No")

### FIXED CODE ###

n = list(input())
print("Yes" if min(len(set(n[:3])), len(set(n[1:]))) == 1 else "No")
N, Q = map(int, input().split())
S = input()
L = []
R = []
ans = []
for _ in range(Q):
	l, r = map(int, input().split())
	L.append(l)
	R.append(r)
flag = [0]*(N-1)

for i in range(N):
	if S[i] == 'A' and S[i+1] == 'C':
		flag[i] = 1
		i += 1
	else:
		pass
# print(flag)

for i in range(Q):
	print(sum(flag[L[i]-1:R[i]-1]))

# for i in range(Q):
# 	print(ans[i])

### FIXED CODE ###

N, Q = map(int, input().split())
S = input()
L = []
R = []
# ans = []
for _ in range(Q):
	l, r = map(int, input().split())
	L.append(l)
	R.append(r)
sum = [0] * (N+1)
for i in range(1, N):
	if S[i-1] == 'A' and S[i] == 'C':
		sum[i+1] = sum[i] + 1
	else:
		sum[i+1] = sum[i]
# print(sum)


for i in range(Q):
	print(sum[R[i]] - sum[L[i]])
import sys
input = sys.stdin.readline
from itertools import accumulate
import operator as op
mod = int(1e9+7)
n,k = map(int,input().split())
L=list(map(int,input().split()))
L.sort()
zero = L.count(0)
if zero>0:
    L.remove(0)

l1 = L[:k]
l2 = L[n-zero-k:]
pr1 = 1
pr2 = 1
count1=0
count2=0 
val1 = []
val2 = []

for i in range(k):
    pr1 = abs(pr1* l1[i])%mod
    if l1[i]<0:
        count1+=1
        pr1 = ((-1)**count1)*pr1
    pr2 = abs(pr2* l2[i])%mod
    if l2[i]<0:
        count2+=1
        pr2 = ((-1)**count2)*pr2

val = max(pr1,pr2)
print(val%mod)


### FIXED CODE ###

import sys
input = sys.stdin.readline
mod  = int(1e9+7)

n,k = map(int,input().split())
L = list(map(int,input().split()))
ans = 1 
if k==n:
    for i in L:
        ans*=i
        ans%=mod
    print(ans%mod)
    sys.exit()

pos = []
neg = []
for i in L:
    if i>=0:
        pos.append(i)
    else:
        neg.append(i)

pos.sort(reverse=True)
neg.sort()

if len(pos) == 0 and k%2!=0:
    for i in range(1,k+1):
        ans *= neg[-i]
        ans %= mod
    print(ans%mod)
    sys.exit()

if k%2!=0:
    ans*=pos.pop(0)
    k-=1

l=[]
for i in range(1,len(pos),2):
    l.append(pos[i]*pos[i-1])
    
for i in range(1,len(neg),2):
    l.append(neg[i]*neg[i-1])

l.sort(reverse = True)
for i in range(k//2):
    ans *= l[i]
    ans %= mod
print(ans%mod)
import bisect
I=lambda:map(int,input().split())
N,Q=I()
S=input()
m=[]
for i in range(N-1):
    if S[i]=='A' and S[i+1]=='C':m.append(i+1)
#print(m)
for i in range(Q):
    l,r=I()
    li=bisect.bisect_left(m,l)
    ri=bisect.bisect_left(m,r)
    #print(i,li,ri)
    if m[ri-1]==r:
        print(ri-li-1)
    else:
        print(ri-li)

### FIXED CODE ###

I=lambda:map(int,input().split())
N,Q=I()
S=input()
m=[0]
for i in range(N-1):
    m+=[m[-1]+(1 if S[i:i+2]=='AC' else 0)]
#print(m)
for i in range(Q):
    l,r=I()
    print(m[r-1]-m[l-1])
n = int(input())
a = input()
list1 = list(map(int,a.split()))

list2 = []
list2.append(list1[0])
for i in range(n):
    list2.append(min(list1[(n-1)-i:]))
print(sum(list2))

### FIXED CODE ###

n = int(input())
list1 = list(map(int,input().split()))
cout = list1[-1]
min_int = list1[-1]
for i in range(n-3,-1,-1):
    cout += min(list1[i:i+2])

cout += list1[0]

print(cout)
a,b,c = input().split(' ')
for i in range(int(c)):
  if int(a) >= 1:
    a = int(a) - 1
  else:
    b = int(b) - 1
print(a + " " + b)

### FIXED CODE ###

a,b,k = map(int , input().split())
if a < k:
    b = (a + b) - k
    if b < 0:
        b = 0
    a = 0
elif a >= k:
    a = a - k
print(a,b)
s = input()
 
wea = ["Sunny", "Cloudy", "Rainy"]
 
print("{}".format(wea[wea.index(s) + 1 % 3]))

### FIXED CODE ###

s = input()
 
wea = ["Sunny", "Cloudy", "Rainy"]
 
print("{}".format(wea[(wea.index(s) + 1) % 3]))
N = int(input())
for i in range(1,N):
  tmp += i
print(tmp)

### FIXED CODE ###

N = int(input())
tmp =0
for i in range(1,N+1):
  tmp += i
print(tmp)
H, W, K = map(int, input().split())
S = list(input() for i in range(H))

sum = [[0] * (W+1) for i in range((H+1))]
for i in range(H):
    for j in range(W):
        sum[i+1][j+1] = sum[i][j+1] + sum[i+1][j] - sum[i][j] + (1 if S[i][j] == '1' else 0)

ans = H + W - 2

for ptn in range(1<<H-1): # 2^H - 1 通り
    cand = 0

    sep = [0] # 横方向の分割リスト、ここ天才
    for i in range(H-1):
        if((ptn >> i) & 1): # & を取ることで、上の桁を消せる
            sep.append(i+1)
            cand += 1
    sep.append(H)

    left = 0 # left は直前の分割
    for pos in range(W):
    	cur = [] # cur は今見てるホワイトチョコの個数のリスト

    	# 横方向に分割されている各部分について
    	for i in range(len(sep) - 1):
    		cur.append(sum[sep[i+1]][pos+1] - sum[sep[i+1]][left] - sum[sep[i]][pos+1] + sum[sep[i]][left])

    	if max(cur) > K:
    		if left == pos: # 縦に分割できない場合(一列しかない場合)
    			cand = H * W
    			break
    		else:
    			cand += 1
    			left = pos

    ans = min(ans, cand)

print(ans)


### FIXED CODE ###

N, M = map(int, input().split())

a = N * (N-1) / 2
b = M * (M-1) / 2

print(int(a+b))
b=map(int,input().split())
print((n//(a+b))*a+min([n%(a+b),a]))

### FIXED CODE ###

n,a,b=map(int,input().split())
print(((n//(a+b))*a)+min([n%(a+b),a]))
N , Y = map(int , input().split())
for y in range(N + 1):
    z = - N / 9 + Y / 9000 - 4 * y / 9
    tmp_z = z - int(z)
    if int(str(tmp_z)[2]) != 0:
        continue
    else:
        z = int(z)
    x = 5 * N / 4 - Y / 4000 + 5 * z / 4
    tmp_x = x - int(x)
    if int(str(tmp_x)[2]) != 0:
        continue
    else:
        x = int(x)
    '''
    if x >= 0 and y >= 0 and z >= 0:
        print("------------")
        print(x)
        print(y)
        print(z)
        print("------------")
    '''
    if x + y + z == N and 1000 * x + 5000 * y + 10000 * z == Y and 2000 >= x >= 0 and 2000 >= z >= 0:#and y >= 0 and z >= 0:
        print(z,y,x)
        exit(0)
print("-1 -1 -1")

### FIXED CODE ###

N , Y = map(int , input().split())
for k1 in range(N + 1):
    for k5 in range(N + 1 - k1):
        k10 = N - k1 - k5
        if k1 + k5 + k10 == N and 1000 * k1 + 5000 * k5 + 10000 * k10 == Y and k10 >= 0:
            print(k10 , k5 , k1)
            exit(0)
print("-1 -1 -1 ")
import math

my_value = int(input())

print("{} {}".format(pow(my_value, 2) * math.pi, 2 * math.pi * my_value))
2

### FIXED CODE ###

import math

my_value = float(input())

print("{} {}".format(pow(my_value, 2) * math.pi, 2 * math.pi * my_value))
M, N = map(int, input())
if M == N:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

m, n = map(int, input().split())
if m == n:
  print('Yes')
else:
  print('No')
from collections import Counter

N, M, K = map(int, input().split())
AB = [tuple(map(int, input().split())) for _ in range(M)]
CD = [tuple(map(int, input().split())) for _ in range(K)]


class UnionFind:
    def __init__(self, n):
        self.parent = list(range(n))

    def root(self, x):
        if self.parent[x] == x:
            return x
        return self.root(self.parent[x])

    def unite(self, x, y):
        rx = self.root(x)
        ry = self.root(y)
        if rx != ry:
            self.parent[rx] = ry


uf = UnionFind(N)

for a, b in AB:
    uf.unite(a - 1, b - 1)

roots = [uf.root(i) for i in range(N)]
counter_roots = Counter(roots)

ans = [counter_roots[roots[i]] - 1 for i in range(N)]

for a, b in AB:
    if roots[a - 1] == roots[b - 1]:
        ans[a - 1] -= 1
        ans[b - 1] -= 1
for a, b in CD:
    if roots[a - 1] == roots[b - 1]:
        ans[a - 1] -= 1
        ans[b - 1] -= 1

print(" ".join(map(str, ans)))


### FIXED CODE ###

from collections import Counter

N, M, K = map(int, input().split())
AB = [tuple(map(int, input().split())) for _ in range(M)]
CD = [tuple(map(int, input().split())) for _ in range(K)]


class UnionFind:
    def __init__(self, n):
        self.parent = list(range(n))
        self.rank = [0] * n

    def root(self, x):
        if self.parent[x] == x:
            return x
        else:
            self.parent[x] = self.root(self.parent[x])
            return self.parent[x]

    def unite(self, x, y):
        root_x = self.root(x)
        root_y = self.root(y)
        if self.rank[x] > self.rank[y]:
            self.parent[root_y] = root_x
        elif self.rank[x] < self.rank[y]:
            self.parent[root_x] = root_y
        elif root_x != root_y:
            self.parent[root_y] = root_x
            self.rank[x] += 1
        pass


uf = UnionFind(N)

for a, b in AB:
    uf.unite(a - 1, b - 1)

roots = [uf.root(i) for i in range(N)]
counter_roots = Counter(roots)

ans = [counter_roots[roots[i]] - 1 for i in range(N)]

for a, b in AB:
    if roots[a - 1] == roots[b - 1]:
        ans[a - 1] -= 1
        ans[b - 1] -= 1
for a, b in CD:
    if roots[a - 1] == roots[b - 1]:
        ans[a - 1] -= 1
        ans[b - 1] -= 1

print(*ans)