Harryxun/stf_run huggingface dataset:
x, y = map(int, input().split())
print(x*y/2)

### FIXED CODE ###

x, y, z = map(int, input().split())
print(x*y//2)
K = input()
S = input()
if len(S) < K:
    print(S)
else:
    print("S[:K]" + "...")


### FIXED CODE ###

K = input()
S = input()
K = int(K)
if len(S) <= K:
    print(S)
else:
    a = S[:K] + "..."
    print(a)
A,B = list(map(int,input().split()))
print(math.ceil((A-B)/(B-1))+1)

### FIXED CODE ###

import math
A,B = list(map(int,input().split()))
_ =input()
print(math.ceil((A-B)/(B-1))+1)
if __name__ = '__main__':
  A, B, C = map(int, input().split())
  if A == B:
    print(C)
  elif A == C:
    print(B)
  else:
    print(A)

### FIXED CODE ###

if __name__ == '__main__':
  A, B, C = map(int, input().split())
  if A == B:
    print(C)
  elif A == C:
    print(B)
  else:
    print(A)
a=input()
b=input()
c=a.split()
d=b.split()
e=0
k=1
u=int(c[1])
for i in range(len(d)):
        e+=int(d[i])
        k+=1
        if e>u:
                break
print(k)

### FIXED CODE ###

a=input()
b=a.split()
if int(b[0])<int(b[1]):
  print(0)
else:
  print(10)
t=int(input())
d=int(input())
c=d//t
f=c/t
if f!=c:
  c+=1
print(c)

### FIXED CODE ###

import math
a,b=map(int,input().split())
print(math.ceil((b-1)/(a-1)))
N = int(input())
X = [0 for i in range(N)]
Y = [0 for i in range(N)]
H = [0 for i in range(N)]
tmp = []
for i in range(N):
    X[i], Y[i], H[i] = map(int, input().split())
for cx in range(0,101):
    for cy in range(0, 101):
        for i in range(N):
            if h != 0:
                ch = abs(X[i]-cx) + abs(Y[i]-cy) + H[i]
                tmp.add([cx, cy, ch])
for x, y, h in tmp:
    flag = True
    for i in range(N):
        if H[i] != max(h - abs(X[i]-cx) - abs(Y[i]-cy), 0)
            flag = False
            break
    if flag:
        print(x, y, h)
        break


### FIXED CODE ###

N = int(input())
xyh = [list(map(int, input().split())) for i in range(N)]
ansx = 0
ansy = 0
ansh = 0
for x in range(101):
  for y in range(101):
    hset = set()
    for i in range(N):
      xyhi = xyh[i]
      if xyhi[2] == 0:
        continue
      hset.add(abs(xyhi[0]-x) + abs(xyhi[1]-y) + xyhi[2])

    if len(hset) == 1 and list(hset)[0] != 0:
      flag = True
      for i in range(N):
        xyhi = xyh[i]
        if xyhi[2] != 0:
          continue
        elif xyhi[2] == 0 and max(list(hset)[0] - abs(xyhi[0]-x) - abs(xyhi[1]-y), 0) == 0:
          continue
        flag = False
        break
      if flag:
        ansx = x
        ansy = y
        ansh = list(hset)[0]

print(ansx, ansy, ansh)
n = int(input())
d = 1000000000000000000000
for i in range(1, sqrt(n)+1):
  if n % i == 0:
    d = min(d, i + n // i - 2)
print(d)


### FIXED CODE ###

from math import sqrt
n = int(input())
d = 1000000000000000000000
for i in range(1, int(sqrt(n))+1):
  if n % i == 0:
    d = min(d, i + n // i - 2)
print(d)
N,K=map(int,input().split())
*A,=map(int,input().split())

point=[0]*N
count_X=0
count_Y=0
i=0
while 3 not in point:
    if 2 not in point:
        count_X+=1
    point[i]+=1
    i=A[i]-1
    if 2 in point:
        count_Y+=1
count_Y-=1

if K>=count_X:
    Z=count_X+(K-count_X)%count_Y
else:
    Z=K

i=0
ans=1
while i<Z:
    ans=A[ans-1]
    i+=1

print(ans)
    

### FIXED CODE ###

N,K=map(int,input().split())
*A,=map(int,input().split())

point=[0]*N
count_X=0
count_Y=0
i=0
while point[i]!=3:
    if point[i]<2:
        count_X+=1
    point[i]+=1
    i=A[i]-1
    if point[i]>1:
        count_Y+=1
count_Y-=1

if K>=count_X:
    Z=count_X+(K-count_X)%count_Y
else:
    Z=K

i=0
ans=1
while i<Z:
    ans=A[ans-1]
    i+=1

print(ans)
N, M = map(int, input().split())
p = list(map(int, input().split()))

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

unionfind = UnionFind(N)
for _ in range(M):
    x, y = map(int, input().split())
    unionfind.union(x, y)
ans = 0
for i in range(N):
    if i + 1 != p[i]:
        if unionfind.same(p[i], i + 1):
            ans += 1
    else:
        ans += 1
print(ans)

### FIXED CODE ###

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

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x
    
    def same(self, x, y):
        return self.find(x) == self.find(y)

unionfind = UnionFind(N + 1)

for _ in range(M):
    x, y = map(int, input().split())
    unionfind.union(P[x - 1], P[y - 1])

ans = 0
idx = []
for i in range(N):
    if P[i] == (i + 1):
        ans += 1
    else:
        idx.append(i)
for i in idx:
    if unionfind.same(P[i], i + 1):
        ans += 1
print(ans)
r, g, b = map(int, input().split())
a = str(r) + str(g) + str(b)
if a%4 == 0:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

r, g, b = map(int, input().split())
a = str(r) + str(g) + str(b)
if int(a)%4 == 0:
    print("YES")
else:
    print("NO")
import sys
import math
input = sys.stdin.readline

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

arr=list(map(int,input().split()))

ans=[0]*N

ans[N-2]=abs(arr[-2]-arr[-1])

for i in range(N-3,-1,-1):
	minn=math.inf
	for j in range(min(K,N-i-1)):
		minn = min(minn,abs(arr[i]-arr[i+j+1])+ans[i+j+1])
	ans[i]=minn

print(ans[0])

### FIXED CODE ###

import sys
import math
input = sys.stdin.readline

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

arr=list(map(int,input().split()))

ans=[0]*N

ans[N-2]=abs(arr[-2]-arr[-1])

for i in range(N-3,-1,-1):
	minn=100000000000000
	for j in range(min(K,N-i-1)):
		minn = min(minn,abs(arr[i]-arr[i+j+1])+ans[i+j+1])
	ans[i]=minn

print(ans[0])
x=int(input())

for i in range(-70,71):
  for j in range(-70,71):
    if i**5-j**5==x:
      a=i
      b=j
print(a,b)

### FIXED CODE ###

x=int(input())
for i in range(-200,200):
  for j in range(-200,200):
    if i**5-j**5==x:
      a=i
      b=j
print(a,b)
S = input()
K = int(input())

import re

def nchars(s, n):
    assert n > 0
    reg = re.compile("(.)\\1{%d,}" % (n - 1))
    while True:
        m = reg.search(s)
        if not m:
            break
        yield m.group(0)
        s = s[m.end():]

if S[0]!=S[-1]:
  S_l = list(nchars(S,2))
  answer = 0
  for s in S_l:
    answer += len(s)//2
  print(answer*K)

else:
  if (S[0]!=S[1])&(S[-1]!=S[-2]):
    answer = 0
    S_lr=0
    S_l = list(nchars(S,2))
    for s in S_l:
      S_lr += len(s)//2

    answer = S_lr + (1+S_lr)*(K-1)
    print(answer)
  
  elif (S[0]!=S[1])&(S[-1]==S[-2]):
    answer = 0
    S_lr=0
    S_l = list(nchars(S,2))
    for s in S_l:
      S_lr += len(s)//2
    
    a=len(S_l[-1])
    answer = S_lr + ((a+1)//2 + (S_lr-a//2))*(K-1)
    print(answer)
  
  elif (S[0]==S[1])&(S[-1]!=S[-2]):
    answer = 0
    S_lr=0
    S_l = list(nchars(S,2))
    for s in S_l:
      S_lr += len(s)//2
    
    a=len(S_l[0])
    answer = S_lr + ((a+1)//2 + (S_lr-a//2))*(K-1)
    print(answer)
    
  else:
    answer = 0
    S_lr=0
    S_l = list(nchars(S,2))
    for s in S_l:
      S_lr += len(s)//2
    
    a=len(S_l[0])
    b=len(S_l[-1])
    answer = S_lr + ((a+b)//2 + (S_lr-a//2-b//2))*(K-1)
    print(answer)

### FIXED CODE ###

S = input()
K = int(input())

import re

def nchars(s, n):
    assert n > 0
    reg = re.compile("(.)\\1{%d,}" % (n - 1))
    while True:
        m = reg.search(s)
        if not m:
            break
        yield m.group(0)
        s = s[m.end():]

if len(S)==1:
  print(K//2)
  
elif S[0]!=S[-1]:
  S_l = list(nchars(S,2))
  answer = 0
  for s in S_l:
    answer += len(s)//2
  print(answer*K)

else:
  if (S[0]!=S[1])&(S[-1]!=S[-2]):
    answer = 0
    S_lr=0
    S_l = list(nchars(S,2))
    for s in S_l:
      S_lr += len(s)//2

    answer = S_lr + (1+S_lr)*(K-1)
    print(answer)
  
  elif (S[0]!=S[1])&(S[-1]==S[-2]):
    answer = 0
    S_lr=0
    S_l = list(nchars(S,2))
    for s in S_l:
      S_lr += len(s)//2
    
    a=len(S_l[-1])
    answer = S_lr + ((a+1)//2 + (S_lr-a//2))*(K-1)
    print(answer)
  
  elif (S[0]==S[1])&(S[-1]!=S[-2]):
    answer = 0
    S_lr=0
    S_l = list(nchars(S,2))
    for s in S_l:
      S_lr += len(s)//2
    
    a=len(S_l[0])
    answer = S_lr + ((a+1)//2 + (S_lr-a//2))*(K-1)
    print(answer)
    
  else:
    answer = 0
    S_lr=0
    S_l = list(nchars(S,2))
    if len(S_l)==1:
      print(len(S)*K//2)
    else:
      for s in S_l:
        S_lr += len(s)//2

      a=len(S_l[0])
      b=len(S_l[-1])
      answer = S_lr + ((a+b)//2 + (S_lr-a//2-b//2))*(K-1)
      print(answer)
import sys

sys.setrecursionlimit(20000)

def dfs(i, total):
    if (i > A - 1):
        return False
    if (total - SPECIALS[i] <= 0):
        return True
    else:
        return dfs(i + 1, total - SPECIALS[i])

H, A = map(int, input().split())
SPECIALS = map(int, input().split())
SPECIALS = list(reversed(sorted(SPECIALS)))

print("Yes" if dfs(0, H) else "No")


### FIXED CODE ###

import sys

sys.setrecursionlimit(200000)

def dfs(i, total):
    if (i > A - 1):
        return False
    if (total - SPECIALS[i] <= 0):
        return True
    else:
        return dfs(i + 1, total - SPECIALS[i])

H, A = map(int, input().split())
SPECIALS = map(int, input().split())
SPECIALS = list(reversed(sorted(SPECIALS)))

print("Yes" if dfs(0, H) else "No")
h, w = map(int, input().split())
s = [input() for _ in range(h)]

# ある経路をきめる.
# そのとき(白マスから黒マスに移動する回数)＝(その経路がいい経路にするための操作回数）
count = 0
if s[0][0] == "#":
    count = 1

dp = [[100000]*w for _ in range(h)]
dp[0][0] = count
# dp[i][j]は00からijに行くときに白マスから黒マスに移動する回数の最小値
for j in range(h):
    for i in range(w):
        if i+1 < w:
            count1 = dp[i][j]
            if s[i][j] == "." and s[i+1][j] == "#":
                count1 += 1
            dp[i+1][j] = min(dp[i+1][j], count1)
        if j+1 < h:
            count2 = dp[i][j]
            if s[i][j] == "." and s[i][j+1] == "#":
                count2 += 1
            dp[i][j+1] = min(dp[i][j+1], count2)
print(dp[w-1][h-1])


### FIXED CODE ###

h, w = map(int, input().split())
s = [list(input()) for _ in range(h)]

# ある経路をきめる.
# そのとき(白マスから黒マスに移動する回数)＝(その経路がいい経路にするための操作回数）
dp = [[float("inf")]*w for _ in range(h)]
if s[0][0] == "#":
    dp[0][0] = 1
else:
    dp[0][0] = 0
# dp[i][j]は00からijに行くときに白マスから黒マスに移動する回数の最小値
for i in range(h):
    for j in range(w):
        if i+1 < h:
            count1 = dp[i][j]
            if s[i][j] == "." and s[i+1][j] == "#":
                count1 += 1
            dp[i+1][j] = min(dp[i+1][j], count1)
        if j+1 < w:
            count2 = dp[i][j]
            if s[i][j] == "." and s[i][j+1] == "#":
                count2 += 1
            dp[i][j+1] = min(dp[i][j+1], count2)
print(dp[h-1][w-1])
N = int(input())
A = list(map(int, input().split()))

A.sort()
all_d = A[0]
max_d = max(divi(A[0],A[1]), divi(A[0],A[2])) if N > 2 else A[1]
for i in range(1,N):
    all_d = divi(all_d, A[i])
    if max_d < all_d:
        max_d = all_d
print(max_d)

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
def divi(a, b):
    rem = b % a
    if rem == 0:
        return a
    else:
        return divi(rem, a)
A.sort()
all_d = divi(A[0], A[1])
max_d = max(all_d, max(divi(A[1],A[2]), divi(A[0],A[2]))) if N > 2 else A[1]
for i in range(2,N):
    d = divi(all_d, A[i])
    max_d = divi(max_d, A[i])
    if max_d < all_d:
        max_d = all_d
    all_d = d
print(max_d)
H,N = list(map(int,input().split()))
INF = 10 ** 12

magics = []
for i in range(N):
    magics.append(list(map(int,input().split())))

#どう考えてもTLEだけどとりあえず
DP = [10**9]*(H+1)
DP[0] = 0
for i in range(N):
    for j in range(magics[i][0]):
        DP[j] = min(DP[j],magics[i][1])
    for j in range(magics[i][0],H+1):
        DP[j] = min(DP[j],DP[j-magics[i][0]]+magics[i][1])

print(DP[H])


### FIXED CODE ###

H,N = list(map(int,input().split()))

magics = []
for i in range(N):
    magics.append(list(map(int,input().split())))

#どう考えてもTLEだけどとりあえず
DP = [10**9]*(H+1)
DP[0] = 0
for i in range(N):
    for j in range(min(magics[i][0],H+1)):
        DP[j] = min(DP[j],magics[i][1])
    for j in range(magics[i][0],H+1):
        DP[j] = min(DP[j],DP[j-magics[i][0]]+magics[i][1])

print(DP[H])
a, b, c = map(int, input().split())
print(count(1))

### FIXED CODE ###

print(input().count("1"))
n=int(input())
s=[input() for i in n]
print(s.sort())

### FIXED CODE ###

N,L=map(int,input().split())
s=[input() for i in range(N)]
s=sorted(s)
s="".join(s)
print(s)
S = input()
T = input()
ans ='Yes'
d = {}
for i, (s, t) in enumerate(zip(S, T)):
    if s == t:
        continue
    if d.get(s) is not None or d.get(t) is not None:
        if d[s] != t or d[t] != s:
            ans = 'No'
            break
    d[s] = t
    d[t] = s
    
print(ans)

### FIXED CODE ###

S = input()
T = input()
ans ='Yes'
d = {}
d2 = {}
for s, t in zip(S, T):

    if d.get(s) is not None:
        if d[s] != t:
            ans = 'No'
            break
    else:
        d[s] = t

    if d2.get(t) is not None:
        if d2[t] != s:
            ans = 'No'
            break
    else:
        d2[t] = s

print(ans)
N=int(input())
l=list(map(int,input().split()))

a='Yes'
for i in range(N-1):
  if l[i]=l[i+1]:
    continue
  elif l[i]<l[i+1]:
    l[i+1]-=1
  else:
    a='No'
    
print(a)

### FIXED CODE ###

n = int(input())
h = list(map(int, input().split()))
 
before = 0
result = 'Yes'
for i in range(len(h)):
    if i == 0:
        before = h[i] - 1
    else:
        if before < h[i]:
            before = h[i] - 1
        elif before == h[i]:
            before = h[i]
        else:
            result = 'No'
print(result)
import math

N = int(input())
T = [int(input()) for i in range(N)]

LCM = []
for i in range(N-1):
    lcm = T[i] * T[i+1] // math.gcd(T[i], T[i+1])
    LCM.append(lcm)

print(LCM[-1])


### FIXED CODE ###

import fractions

N = int(input())
T = [int(input()) for i in range(N)]

LCM = 1
for i in range(N):
    lcm = (T[i] * LCM) // (fractions.gcd(T[i], LCM))
    LCM = lcm

print(LCM)
a,b,c=map(str, input().split())
if b=="+":
  print(int(A)+int(B))
else:
  print(int(A)-int(B))

### FIXED CODE ###

a,b,c=map(str, input().split())
if b=="+":
  print(int(a)+int(c))
else:
  print(int(a)-int(c))
from operator import itemgetter


n = int(input())
info = [list(map(int, input().split())) for i in range(n)]

info = sorted(info, key = itemgetter(1))
print(info[0][0] + info[0][])

### FIXED CODE ###

from operator import itemgetter


n = int(input())
info = [list(map(int, input().split())) for i in range(n)]

info = sorted(info, key = itemgetter(1))
print(info[0][0] + info[0][1])
n, k = [int(i) for i in input().split()]
ds = []
As = ()
for i in range(2*k):
    ds.append(int(input()))
    As += set([int(j) for j in input().split()])


print(n-len(As))

### FIXED CODE ###

n, k = [int(i) for i in input().split()]
ds = []
As = []
for i in range(k):
    ds.append(int(input()))
    As += [int(j) for j in input().split()]
 
 
print(n-len(set(As)))
n=int(input())
f=0
frag='No'
for i in 8:
  f+=n%(10**(i+1))//10**i
if n%f==0:
  frag='Yes'
print(frag)

### FIXED CODE ###

n=int(input())
f=0
frag='No'
for i in range(8):
  f+=n%(10**(i+1))//10**i
if n%f==0:
  frag='Yes'
print(frag)
A,B,C,D=map(int,input().split())
while if A>0 and C>0:
    A-=D
    C-=B
if C>0:
    print('No')
else:
    print('Yes')

### FIXED CODE ###

A,B,C,D=map(int,input().split())
while A>0 and C>0:
    A-=D
    C-=B
if C>0:
    print('No')
else:
    print('Yes')
a1= list(map(int,input().solit()))
a2= list(map(int,input().solit()))
a3= list(map(int,input().solit()))
a = a1 + a2 + a3

n = int(input())

#bがaにあるか確認して0へ
for _ in range(n):
  b = int(input())
  if b in a:
    a[a.index(b)]=0
  
  
check = 0
for i in range(3):
  #縦横のbingo検索
  if (a[3*i]==a[3*i+1] and a[3*i+1]==a[3*i+2]) or (a[i]==a[i+3] and a[i+3]==a[i+6]):
        check+=1
#ななめ
if (a[0]==a[4] and a[4]==a[8]) or (a[2]==a[4] and a[4]==a[6]):
    check+=1
if check>0:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

a1= list(map(int,input().split()))
a2= list(map(int,input().split()))
a3= list(map(int,input().split()))
a = a1 + a2 + a3
 
n = int(input())
 
#bがaにあるか確認して0へ
for _ in range(n):
  b = int(input())
  if b in a:
    a[a.index(b)]=0
  
  
check = 0
for i in range(3):
  #縦横のbingo検索
  if (a[3*i]==a[3*i+1] and a[3*i+1]==a[3*i+2]) or (a[i]==a[i+3] and a[i+3]==a[i+6]):
        check+=1
#ななめ
if (a[0]==a[4] and a[4]==a[8]) or (a[2]==a[4] and a[4]==a[6]):
    check+=1
if check>0:
    print("Yes")
else:
    print("No")
const main = input =>{
    result = '';
    switch (input) {
        case 'Sunny':
            result = 'Cloudy';
            break;
        case 'Cloudy':
            result = 'Rainy';
            break;
        case 'Rainy':
            result = 'Sunny';
            break;
    }
    console.log(result);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));

### FIXED CODE ###

s = input()
if s == 'Sunny':
    print('Cloudy')
elif s == 'Cloudy':
    print('Rainy')
else:
    print('Sunny')
N = int(input())
divisors = [0] * N
ans = 0
for i in range(N):
    num = i+1
    for j in range(i, N, num):
        divisors[j] += 1
    ans += num * divisors[i]
print(ans)

### FIXED CODE ###

import numpy as np
N, M, K = map(int, input().split())
A = [0]
B = [0]
A += list(map(int, input().split()))
B += list(map(int, input().split()))
A_cumsum = np.cumsum(A, dtype='int64')
B_cumsum = np.cumsum(B, dtype='int64')

def binary_search(k):
    if B_cumsum[-1] <= k:
        return M
    right = M
    left = 0
    while right != left:
        mid = (left + right) // 2
        if B_cumsum[mid] > k:
            right = mid
        else:
            left = mid + 1
    return left - 1

ans = 0
for i in range(N+1):
    count = 0
    if A_cumsum[i] <= K:
        count += i
    else:
        break
    count += binary_search(K - A_cumsum[i])
    if ans < count:
        ans = count
print(ans)
S = input()
T = input()

count = 0
for i in range(1000):
    if S[i] == T[i]:
        count += 1
print(count)

### FIXED CODE ###

S = input()
T = input()

count = 0
for i in range(3):
    if S[i] == T[i]:
        count =count + 1
print(count)
N = int(input())
A = [int(s) for s in input().split(" ")]
R = [0] * (A + 1)
for a in A:
	R[a - 1] += 1
for a in R:
  print(a)

### FIXED CODE ###

N = int(input())
A = [int(s) for s in input().split(" ")]
R = [0] * (len(A) + 1)
for a in A:
	R[a - 1] += 1
for a in R:
  print(a)
n , x = map(int,input().split())

field = [int(i) for i in input().split()]

diff = list(map(lambda a:abs(a-x),field))

def gcd(x,y):

    if x < y:
        x,y = y,x

    if x % y == 0:
        return y
    else:
        gcd(y,x%y)

ans = diff[0]


for i in diff[1:]:
    ans = gcd(i,ans)

print(ans)

### FIXED CODE ###

n , x = map(int,input().split())

field = [int(i) for i in input().split()]

diff = list(map(lambda a:abs(a-x),field))

def gcd(x,y):
    # print(x,y)
    if x < y:
        x,y = y,x

    if x % y == 0:
        return y
    else:
        return gcd(y,x%y)

ans = diff[0]


for i in diff[1:]:
    ans = gcd(i,ans)

print(ans)
n=int(input())
string_list=[input() for i in range(n)]
import collections
import numpy as np
c = collections.Counter(string_list)
d=c.most_common()
x=int(d[0][1])
z=[]
for i in range(len(d)):
  y=int(d[i][1])
  if x==y:
    z.append(str(d[i][0]))
    
z.sort()
for i in range(len(z)):
  print(z[i])

### FIXED CODE ###

a=list(map(int,input().split()))
count=0
if a[0]==a[1]:
  count=count+1
if a[0]==a[2]:
  count=count+1
if a[1]==a[2]:
  count=count+1  
if count==1:
  print("Yes")

else:
  print("No")
a=input()
b=input()
c=input()
d=input()

aa=int(a)
bb=int(b)
cc=int(c)
dd=int(d)
print (aa*bb-(bb*cc+aa*dd-cc*dd))

### FIXED CODE ###

a,b=map(int,input().split())
c,d=map(int,input().split())
print ((a-c)*(b-d))
S=input()
print(S[0]S[1]S[2])

### FIXED CODE ###

S=input()
B=0
B=S[0]+S[1]+S[2]
print(B)
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

n,q = mi()
b = [[] for i in range(n)]
ans = [0]*n
for i in range(n-1):
    a,c = mi()
    b[a-1].append(c-1)
    b[c-1].append(a-1)

print(b)

def chil_pop(l):
    for i in b[l]:
        b[i].pop(b[i].index(l))
        chil_pop(i)

chil_pop(0)

def chil_add(z,x):
    ans[z] += x
    for i in b[z]:
        chil_add(i,x)

for i in range(q):
    p,x = mi()
    chil_add(p-1,x)

for i in range(n):
    print(ans[i],end=' ')


### FIXED CODE ###

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

import sys
sys.setrecursionlimit(40000000)

n,q = mi()
b = [[] for i in range(n)]
ans = [0]*n

# O(2n)
for i in range(n-1):
    a,c = mi()
    b[a-1].append(c-1)
    b[c-1].append(a-1)

# jun = []
# O(2n)
# def chil_pop(l,p):
#     jun.append(l)
#     for i in b[l]:
#         if i == p:
#             continue
#         chil_pop(i,l)
#     b[l] = p

# chil_pop(0,-1)


# O(q)
for i in range(q):
    p,x = mi()
    ans[p-1] += x


count = 0
q = [(0,-1)]
while q:
    c,p = q.pop()
    for i in b[c]:
        if i == p:
            continue
        ans[i] += ans[c]
        q.append((i,c))
    
    

# for i in jun[1:]:
#     ans[i] += ans[b[i]]

# ans_str = ''
# for i in range(n):
#     print(ans[i],end=' ')
#     # ans_str = ans_str + str(ans[i]) + ' '
print(*ans)
even,odd = map(int, input().split())

def f(n):
if n == 1 or n ==0:
   return 1
else:
   return n*f(n-1)
  
print(f(even) + f(odd))

### FIXED CODE ###

even,odd = map(int, input().split())

  
print(int(even * (even-1)/2 + odd * (odd-1)/2))
import math
r=float().input()
c = r * r *math.pi
cf = r *2 *math.pi
print("{0:.5f} {1:.5f}".format(c,cf))

### FIXED CODE ###

import math
r = float(input())
s=r**2*math.pi
l=2*r*math.pi
print('{:.6f} {:.6f}'.format(s,l))
a,b,c = map( int , raw_input().split() )

if a < b < c:
  print "%d %d %d" %(a,b,c)
elif a < c < b:
  print "%d %d %d" %(a,c,b)
elif b < a < c:
  print "%d %d %d" %(b,a,c)
elif b < c < a:
  print "%d %d %d" %(b,c,a)
elif c < a < b:
  print "%d %d %d" %(c,a,b)
else c < b < a:
  print "%d %d %d" %(c,b,a)

### FIXED CODE ###

N = map( int , raw_input().split() )
 
if N[0] < N[1] < N[2] or N[0] == N[1] == N[2] or N[0] < N[1] == N[2] or N[0] == N[1] < N[2]:
  print "%d %d %d" %(N[0],N[1],N[2])
elif N[0] < N[2] < N[1]:
  print "%d %d %d" %(N[0],N[1],N[2])
elif N[1] < N[0] < N[2]:
  print "%d %d %d" %(N[1],N[0],N[2])
elif N[1] < N[2] < N[0] or N[1] < N[2] == N[0] or N[1] == N[2] < N[0]: 
  print "%d %d %d" %(N[1],N[2],N[0])
elif N[2] < N[0] < N[1] or N[2] < N[0] == N[1] or N[2] == N[0] < N[1]:
  print "%d %d %d" %(N[2],N[0],N[1])
elif N[2] < N[1] < N[0]:
  print "%d %d %d" %(N[2],N[1],N[0])