Harryxun/stf_run huggingface dataset:
number = list(int(input()), float(input()))
print('{}'.format(int(number[0] * number[1])))


### FIXED CODE ###

from decimal import Decimal

C, D = map(Decimal, input().split())
print(int(C*D))
a,b,c = map(int, input().split())
A = 0
B = 0
C = 0

if a == 1:
  	A = 1

if b == 1:
  	B = 1

if c == 1:
  	C = 1

print(A+B+C)


### FIXED CODE ###

print(input().count("1"))
import math

A, B = map(int, input().split())

print(int(A*B/math.gcd(A, B)))


### FIXED CODE ###

import fractions

A, B = map(int, input().split())

print(A*B//fractions.gcd(A, B))
n = int(input())
a = list(map(int, input().split()))
r = [0] * 9
for i in a:
    r[i//400] += 1

c = sum([1 for i in r[:-1] if i != 0])
t = r[-1]

if c == 0:
    print(1, t)
else:
    print(c, c+t)

### FIXED CODE ###

from bisect import bisect_right

n = int(input())
a = list(map(int, input().split()))

r = [400, 800, 1200, 1600, 2000, 2400, 2800, 3200]
c = [0] * 9

for score in a:
	i = bisect_right(r, score)
	c[i] += 1

ans = 8 - c[:-1].count(0)

print(max(1, ans), ans + c[8])
def GCD(a, b):
    if a < b:
        a, b = b, a
    if b == 0:
        return a
    else:
        return GCD(b, a % b)


def LCM(a, b):
    return a * b // GCD(a, b)

n = int(input())
a = int(input())
for i in range(n-1):
    ans = LCM(a, int(input()))

print(ans)

### FIXED CODE ###

def GCD(a, b):
    if a < b:
        a, b = b, a
    if b == 0:
        return a
    else:
        return GCD(b, a % b)


def LCM(a, b):
    return a * b // GCD(a, b)

n = int(input())
ans = int(input())
for i in range(n-1):
    ans = LCM(ans, int(input()))

print(ans)
import math
x=int(input())
x=180-x

ans=360//math.gcd(360,x)

if(ans>=90):
    print(1//0)
else:
    print(ans)

#for i in range(1,180):
#    print(i,"°",360//math.gcd(360,i))
#    if(i==x):
#        print("問題の箇所",x,ans)

### FIXED CODE ###

import math
x=int(input())
x=180-x

ans=360//math.gcd(360,x)

ex=[60,120]

if(x in ex):
    x=180-x
    ans=360//math.gcd(360,x)
print(ans)
#for i in range(1,180):
#    if(360//math.gcd(360,i)==6):
#        print(i,360//math.gcd(360,i))
#    if(i==x):
        #print("問題の箇所",x,ans)
from collections import Counter,defaultdict,deque
import sys
import bisect
import math
import itertools
import queue
import copy
from scipy import linalg
import scipy
import numpy as np
from heapq import heappop, heappush
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7

def inp(): # n=1
    return int(input())
def inpm(): # x=1,y=2
    return map(int,input().split())
def inpl(): # a=[1,2,3,4,5,...,n]
    return list(map(int, input().split()))
def inpls(): # a=['1','2','3',...,'n']
    return list(input().split())
def inplm(n): # x=[] 複数行
    return list(int(input()) for _ in range(n))
def inpll(n): # [[1,1,1,1],[2,2,2,2],[3,3,3,3]]
    return sorted([list(map(int, input().split())) for _ in range(n)])
def sortx(x,n,k):
    if k == 0:x.sort(key=lambda y:y[1,n])
    else:x.sort(reversed=True, key=lambda y:y[1,n])

def main():
    s = input()
    NG = 1
    NP = 0
    did = ["g"]
    point = 0
    for i in range(1,len(s)):
        if s[i] == "g":
            if NP + 1 <= NG:
                did.append("p")
                NP += 1
                point += 1
            else:
                did.append("g")
                NG += 1
        else:
            if NP + 1 <= NG:
                did.append("p")
                NP += 1
            else:
                did.append("g")
                NG += 1
                point -= 1
    print(point)

if __name__ == "__main__":
    main()

### FIXED CODE ###

def inp(): # n=1
    return int(input())
def inpm(): # x=1,y=2
    return map(int,input().split())
def inpl(): # a=[1,2,3,4,5,...,n]
    return list(map(int, input().split()))
def inpls(): # a=['1','2','3',...,'n']
    return list(input().split())
def inplm(n): # x=[] 複数行
    return list(int(input()) for _ in range(n))
def inpll(n): # [[1,1,1,1],[2,2,2,2],[3,3,3,3]]
    return sorted([list(map(int, input().split())) for _ in range(n)])
def sortx(x,n,k):
    if k == 0:x.sort(key=lambda y:y[1,n])
    else:x.sort(reversed=True, key=lambda y:y[1,n])

def main():
    s = input()
    NG = 1
    NP = 0
    did = ["g"]
    point = 0
    for i in range(1,len(s)):
        if s[i] == "g":
            if NP + 1 <= NG:
                did.append("p")
                NP += 1
                point += 1
            else:
                did.append("g")
                NG += 1
        else:
            if NP + 1 <= NG:
                did.append("p")
                NP += 1
            else:
                did.append("g")
                NG += 1
                point -= 1
    print(point)

if __name__ == "__main__":
    main()
import math

def least_common_multiple(x, y):
    return int(x * y / math.gcd(x, y))

def main():

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

if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():

    a, b = map(int, input().split())
    for k in range(1, b + 1):
        if a * k % b == 0:
            print(a * k)
            break
        else:
            continue

if __name__ == "__main__":
    main()
i = 0
While True:
    x = int(input())
    if x == 0:
        break
    else:
        i += 1
        print('Case {}: {}'.format(i, x))


### FIXED CODE ###

i = 0
while True:
    x = int(input())
    if x == 0:
        break
    else:
        i += 1
        print('Case {}: {}'.format(i, x))
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
n = int(input())
temp = 1
ans = 0
a = list(map(int, input().split()))
for i in a:
    temp = lcm(temp, i)

for i in a:
    ans +=  int(temp/i)

print(temp/ans)

### FIXED CODE ###

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a

def lcm(x, y):
    return (x * y) // gcd(x, y)


n = int(input())
temp = 1
ans = 0
a = list(map(int, input().split()))
for i in a:
    temp = lcm(temp, i)

for i in a:
    ans +=  int(temp/i)

print(temp/ans)
or P == 5:N, P = map(int, input().split())
S = input()

r_circ = []
v = 1
while True:
    r = v % P
    if r in r_circ:
        break
    r_circ.append(r)
    v *= 10

ans = 0
if P in (2, 5):
    for i, s in enumerate(S):
        if int(s) % P == 0:
            ans += i+1
else:
    pr = 0
    rcntmap = [0] * P
    rcntmap[0] = 1  # r - 0 patten
    for i in reversed(range(len(S))):
        d = int(S[i])
        r = (d * r_circ[(len(S)-1-i) % len(r_circ)] + pr) % P
        #r = int(S[i:]) % P
        ans += rcntmap[r]
    
        rcntmap[r] += 1
        pr = r

print(ans)


### FIXED CODE ###

N, P = map(int, input().split())
S = input()

r_circ = []
v = 1
while True:
    r = v % P
    if r in r_circ:
        break
    r_circ.append(r)
    v *= 10

ans = 0
if P in (2, 5):
    for i, s in enumerate(S):
        if int(s) % P == 0:
            ans += i+1
else:
    pr = 0
    rcntmap = [0] * P
    rcntmap[0] = 1  # r - 0 patten
    for i in reversed(range(len(S))):
        d = int(S[i])
        r = (d * r_circ[(len(S)-1-i) % len(r_circ)] + pr) % P
        #r = int(S[i:]) % P
        ans += rcntmap[r]
    
        rcntmap[r] += 1
        pr = r

print(ans)
N,A,B=map(int, input().split())
S=int(input().split())
cntA=0
cntB=0
for s in S:
  if s == 'c':
    print('No')
    continue
  if s == 'a' and (cntA+cntB) < A+B:
    print('Yes')
    cntA +=1
  elif (s == 'b') and ((cntA+cntB) < A+B) and (cntB < B):
    print('Yes')
    cntB +=1
  else:
    print('No')




### FIXED CODE ###

N,A,B=map(int, input().split())
S=input()
cntA=0
cntB=0
for s in S:
  if s == 'c':
    print('No')
    continue
  if s == 'a' and (cntA+cntB) < A+B:
    print('Yes')
    cntA +=1
  elif (s == 'b') and ((cntA+cntB) < A+B) and (cntB < B):
    print('Yes')
    cntB +=1
  else:
    print('No')
mod = 10 ** 9 + 7

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

es = [[] for _ in range(N)]
g = [0] * N
for _ in range(N - 1):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    es[a].append(b)
    g[a] += 1
    es[b].append(a)
    g[b] += 1

s = -1
b = -1
for i, gg in enumerate(g):
    if gg > b:
        b = gg
        s = i
if b == -1 or s == -1:
    print(1)
    exit()

gs = [0] * (N + 1)
gs[s] = -1
gs[N] = -1
visited = [False] * N
ans = 1


def rec(v, bf):
    global ans
    if visited[v]:
        return
    visited[v] = True
    gs[v] += 1
    gs[bf] += 1
    ans *= K - gs[bf]
    ans %= mod

    for nv in es[v]:
        if not visited[nv]:
            rec(nv, v)
    return


rec(s, N)
print(ans)

# print(gs)


### FIXED CODE ###

import sys

sys.setrecursionlimit(10 ** 6)

mod = 10 ** 9 + 7

input = sys.stdin.readline


def rec(v, bf):
    global ans
    gs[v] += 1
    gs[bf] += 1
    ans = ans * (K - gs[bf]) % mod
    for nv in es[v]:
        if nv == bf: continue
        rec(nv, v)
    return


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

es = [[] for _ in range(N)]
for _ in range(N - 1):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    es[a].append(b)
    es[b].append(a)

gs = [0] * (N + 1)
gs[0] = -1
gs[N] = -1

ans = 1

rec(0, N)
print(ans)
n,k = map(int,input().split())
A = list(map(int,input().split()))
L = format(k, 'b').zfill(50)
S = [[0,0] for _ in range(50)]
if k==0:
    print(sum(A))
    exit()
cnt = [0]*50
for a in A:
    a_ = format(a, 'b').zfill(50)
    for i in range(50):
        if a_[i]=='1':
            S[i][0] += 1
        else:
            S[i][1] += 1
for i in range(len(S)):
    S[i][0] *= pow(2, 50-i-1)
    S[i][1] *= pow(2, 50-i-1)
dp = [[0,0] for _ in range(55)]
for i in range(50):
    if L[i]=='1':
        dp[i+1][0] = dp[i][0] + S[i][1]
        dp[i+1][1] = dp[i][1] + max(S[i][0], S[i][1])
    else:
        dp[i+1][0] = dp[i][0] + S[i][0]
        if dp[i][1] !=  0:
            dp[i+1][1] = dp[i][1] + max(S[i][0], S[i][1])

print(max(dp[-n-1]))

### FIXED CODE ###

n,k = map(int,input().split())
A = list(map(int,input().split()))
cnt = [0]*50
L = format(k, 'b').zfill(50)
S = [[0,0] for _ in range(50)]
for a in A:
    a_ = format(a, 'b').zfill(50)
    for i in range(50):
        if a_[i]=='1':
            S[i][0] += 1
        else:
            S[i][1] += 1
for i in range(len(S)):
    S[i][0] *= pow(2, 50-i-1)
    S[i][1] *= pow(2, 50-i-1)

dp = [[-1,-1] for _ in range(55)]
dp[0][0] = 0

for i in range(50):
    
    if L[i] == '1':
        if dp[i][1] != -1:
            dp[i+1][1] = dp[i][1] + max(S[i][0], S[i][1])
        if dp[i][0] != -1:
            dp[i+1][1] = max(dp[i+1][1], dp[i][0]+S[i][0])
            dp[i+1][0] = dp[i][0] + S[i][1]
        
            
    else:
        if dp[i][1] != -1:
            dp[i+1][1] = dp[i][1] + max(S[i][1], S[i][0])
        if dp[i][0] != -1:
            dp[i+1][0] = dp[i][0] + S[i][0]

print(max(dp[50]))
# _*_ coding:utf-8 _*_
#  Atcoder_AISingProgramming_Contest-B
#  TODO https://aising2019.contest.atcoder.jp/tasks/aising2019_b

def solveProblem(problemSeed,FirstScore,SecondScore,ScoreList):
	firstBarrier = 0
	secondBarrier = 0
	lastBarrier = 0
	for problemNo in range(0,len(ScoreList),+1):
		problemScore = ScoreList(problemNo)
		if problemScore <= FirstScore:
			firstBarrier = firstBarrier + 1
		elif ( FirstScore+1 <= problemScore ) and ( problemScore <= SecondScore):
			secondBarrier = secondBarrier + 1
		else : # secondScore + 1 <= problemScore
			lastBarrier = lastBarrier + 1
	problemPattern = firstBarrier * secondBarrier * lastBarrier
	answer = problemPattern
	return answer


if __name__ == '__main__':
	N = int(input().strip())
	A,B = map(int,input().strip().split(' '))
	Ps = list(map(int,input().strip().split(' ')))
	solution = solveProblem(N,A,B,Ps)
	print("{}".format(solution))


### FIXED CODE ###

# _*_ coding:utf-8 _*_
#  Atcoder_AISingProgramming_Contest-B
#  TODO https://aising2019.contest.atcoder.jp/tasks/aising2019_b

def solveProblem(problemSeed,FirstScore,SecondScore,ScoreList):
	firstBarrier = 0
	secondBarrier = 0
	lastBarrier = 0
	for problemNo in range(0,len(ScoreList),+1):
		problemScore = ScoreList[problemNo]
		if problemScore <= FirstScore:
			firstBarrier = firstBarrier + 1
		elif ( FirstScore+1 <= problemScore ) and ( problemScore <= SecondScore):
			secondBarrier = secondBarrier + 1
		else : # secondScore + 1 <= problemScore
			lastBarrier = lastBarrier + 1
	problemPattern = min(firstBarrier, secondBarrier,lastBarrier)
	answer = problemPattern
	return answer


if __name__ == '__main__':
	N = int(input().strip())
	A,B = map(int,input().strip().split(' '))
	Ps = list(map(int,input().strip().split(' ')))
	solution = solveProblem(N,A,B,Ps)
	print("{}".format(solution))
import math
t = input()
ans = ''
for i in range(len(t)):
    if i == 0:
        ans += t[i]
    else:
        if t[i] == '?':
            if  ans[i-1] == 'P':
                ans += 'D'
            elif ans[i-1] == 'D':
                ans += 'P'
        else:
            ans += t[i]
    #print(ans,i)
print(ans)

### FIXED CODE ###

t = input()
ans  = ''
for i in range(len(t)):
    if i == 0:
        if t[i] == '?':
            ans += 'D'
        else:
            ans += t[i]
    else:
        if t[i] =='?':
            if ans[i-1] == 'P':
                ans += 'D'
            else:
                ans += 'D'
        else:
            ans += t[i]
print(ans)
import numpy as np

n = int(input())
a = np.array(input().split(), dtype=np.int)
mod = 10**9 + 7
max_a = a.max()
sieve = [True] * (max_a // 2)
prime = [2]
p = 3
while p * p <= max_a:
  if sieve[p // 2 - 1]:
    prime.append(p)
    for i in range(p * p, max_a + 1, p):
      sieve[i // 2 - 1] = False
  p += 2
prime.extend([i for i in range(p, max_a + 1, 2) if sieve[i // 2 - 1]])
len_prime = len(prime)

pf = np.zeros((n, len_prime), dtype=np.int)
for i in range(n):
  j = 0
  while prime[j] * prime[j] <= a[i]:
    while a[i] % prime[j] == 0:
      a[i] //= prime[j]
      pf[i, j] += 1
    j += 1
  if a[i] > 1:
    pf[i, prime.index(a[i])] += 1
    
b_pf = pf.max(axis=0) - pf
b_sum = 0
for i in range(n):
  b_sum = (b_sum + np.prod(prime ** b_pf[i])) % mod
print(b_sum)

### FIXED CODE ###

from fractions import gcd

n = int(input())
a = list(map(int, input().split()))
mod = 10**9 + 7

lcm = 1
for i in range(n):
  lcm = lcm * a[i] // gcd(lcm, a[i])
lcm %= mod

sum_b = 0
for i in range(n):
  sum_b = (sum_b + lcm * pow(a[i], mod - 2, mod)) % mod
print(sum_b)
import pandas as pd
n = int(input())
arr_ = [[str(i) for i in input().split()] for _ in range(n)]
arr = pd.DataFrame(arr_)
arr[2] = [i for i in range(n)]
num = arr.sort_values(by=1,ascending=False)
name = num.sort_values(by=0,ascending=True)
name.index = [i for i in range(n)]
for i in range(n):
    print(name[2][i]+1)


### FIXED CODE ###

from operator import itemgetter
n = int(input())
arr_ = [[str(i) for i in input().split()] for _ in range(n)]
for i in range(n):
    arr_[i].append(i+1)
    arr_[i][1] = int(arr_[i][1])

arr_.sort(key=itemgetter(1), reverse=True)
arr_.sort(key=itemgetter(0))
for i in range(n):
    print(arr_[i][2])
W,H,x,y=map(int,input().split())
S=W*H*0.1/2
z=0
if x== W/2 & y== H/2:
    z=1
else:
    z=0
print(S,z)         


### FIXED CODE ###

W,H,x,y=map(int,input().split())
S=W*H/float(2)
z=0
if x== W/2:
    if y== H/2:
        z=1
    else:
        z=0
else:
    z=0
print(S,z)
N, K = map(int, input().split())
A = list(map(int, input().split()))
graph = [set() for i in range(N)]
for i, a in enumerate(A):
    graph[i].add(a - 1)

stack = [0]
seen = {0}
path = []
dist = [-1] * N
while stack:
    cur = stack.pop()
    if dist[cur] != -1:
        break
    dist[cur] = len(path)
    path.append(cur)
    for nei in graph[cur]:
        if nei not in seen:
            stack.append(nei)
            seen.add(nei)

not_loop = graph[cur].pop()
loop = len(path) - not_loop
if K < not_loop:
    print(path[K] + 1)
else:
    K -= not_loop
    K %= loop
    print(path[not_loop + K - 1] + 1)

### FIXED CODE ###

N, K = map(int, input().split())
A = list(map(int, input().split()))
graph = [set() for i in range(N)]
for i, a in enumerate(A):
    graph[i].add(a - 1)

queue = [0]
seen = {0}
path = []
while queue:
    new = []
    for cur in queue:
        path.append(cur)
        for nei in graph[cur]:
            if nei not in seen:
                new.append(nei)
                seen.add(nei)
    queue = new

if 0 in graph[path[-1]]:
    rest = K % len(path)
    print(path[rest] + 1)
else:
    if K < len(path):
        print(path[K] + 1)
    else:
        start = graph[path[-1]].pop()
        index = path.index(start)
        rest = (K - len(path[:index])) % len(path[index:])
        print(path[index:][rest] + 1)
n=int(input())
print(a+a**2+a**3)

### FIXED CODE ###

a=int(input())
print(a+a**2+a**3)
from numpy.core.fromnumeric import sort
n =int(raw_input())
tango =[]
for i in range(n):
    str =raw_input()
    tango.append(str)

tango.sort()
print tango[0]

### FIXED CODE ###

n =int(raw_input())
tango =[]
for i in range(n):
    str =raw_input()
    tango.append(str)

tango.sort()
print tango[0]
from operator import itemgetter

N,T=map(int,input().split())
a=[]
for i in range(N):
    c,t=map(int,input().split())
    a.append([c,t])

a=sorted(a,key=itemgetter(1))

key=0
ans=1001
while a[key][1]<=T:
    ans = min(ans,a[key][0])
    key += 1

if key==0:
    print('TLE')
else:
    print(ans)
    

### FIXED CODE ###

N,T=map(int,input().split())
a=[]
for i in range(N):
    c,t=map(int,input().split())
    a.append([c,t])

cost=10000
for i in range(N):
    if a[i][1] <= T:
        cost = min(cost,a[i][0])



if cost==10000:
    print('TLE')
else:
    print(cost)
def decisum(n):
    if n == 0:
        return 0
    else:
        return n%10 + decisum(n//10)

n = int(input()) 

ans = not (decisum(n)%9)

if ans:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

n = list(input())

ans = 0
for i in n:
    ans += int(i)
    ans = ans%9

print('Yes' if ans == 0 else 'No')
H, W = map(int, input().split())

Ss = []
white_count = 0
for i in range(H):
    s = list(input())
    for masu in s:
        if masu == '.':
            white_count += 1
    Ss.append(s)

# print('white_count', white_count)


def search():
    global Ss_hosu
    #global min_hosu
    Ss_hosu[0][0] = 1
    que = [[0, 0]]
    while len(que) > 0:
        x, y = que.pop(0)
        my_value = Ss_hosu[y][x]
        for dx, dy in [[1, 0], [-1, 0], [0, 1], [0, -1]]:
            if 0 <= x + dx <= W - 1 and 0 <= y + dy <= H - 1:
                if Ss[y + dy][x + dx] == '.' and Ss_hosu[y + dy][x + dx] is None:
                    Ss_hosu[y+dy][x+dx] = my_value + 1
                    que.append([x + dx, y + dy])

    # Ss_hosu[y][x] = value
    # if x == W-1 and y == H-1:
    #     min_hosu = value
    # for dx, dy in [[1,0], [-1,0], [0,1], [0,-1]]:
    #     if 0 <= x+dx <= W-1 and 0 <= y+dy <= H-1:
    #         if Ss[y+dy][x+dx] == '.' and Ss_hosu[y+dy][x+dx] is None:
    #             search(x+dx, y+dy, value=value+1)


Ss_hosu = [[None for _ in range(W)] for _ in range(H)]
search()
min_hosu = Ss_hosu[H-1][W-1]

# for s in Ss_hosu:
#     print(s)

# print('min_hosu', min_hosu)

print(white_count - min_hosu)


### FIXED CODE ###

H, W = map(int, input().split())

Ss = []
white_count = 0
for i in range(H):
    s = list(input())
    for masu in s:
        if masu == '.':
            white_count += 1
    Ss.append(s)

# print('white_count', white_count)


def search():
    global Ss_hosu
    #global min_hosu
    Ss_hosu[0][0] = 1
    que = [[0, 0]]
    while len(que) > 0:
        x, y = que.pop(0)
        my_value = Ss_hosu[y][x]
        for dx, dy in [[1, 0], [-1, 0], [0, 1], [0, -1]]:
            if 0 <= x + dx <= W - 1 and 0 <= y + dy <= H - 1:
                if Ss[y + dy][x + dx] == '.' and Ss_hosu[y + dy][x + dx] is None:
                    Ss_hosu[y+dy][x+dx] = my_value + 1
                    que.append([x + dx, y + dy])

  
Ss_hosu = [[None for _ in range(W)] for _ in range(H)]
search()
min_hosu = Ss_hosu[H-1][W-1]

# for s in Ss_hosu:
#     print(s)

# print('min_hosu', min_hosu)

if min_hosu is None:
    print(-1)
else:
    print(white_count - min_hosu)
N,M=map(int,input().split())

ac=[False]*N
wa=[0]*N

for _ in range(N):
    p,s=input().split()
    p=int(p)-1

    if s=="AC":
        ac[p]=True
    else:
        wa[p]+=1

a=0
b=0

for i in range(N):
    if ac[i]:
        a+=1
        b+=wa[i]

print(a,b,sep=" ")


### FIXED CODE ###

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

ac=[False]*n
wa=[0]*n

for i in range(m):
    p,s=input().split()
    p=int(p)-1

    if s=="AC":
        ac[p]=True
    else:
        if not ac[p]:
            wa[p]+=1

a=0
b=0

for i in range(n):
    if ac[i]:
        a+=1
        b+=wa[i]

print(a,b,sep=" ")
import collections
sys.setrecursionlimit(10**8)

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

g = [[] for i in range(n+1)]

for i in range(n-1):
    a,b = map(int,input().split())
    g[a].append(b)
    g[b].append(a)
    
check = [0] * (n+1)
count = [0] * (n+1)

for i in range(q):
    p,x = map(int,input().split())
    count[p] += x
    
def dfs(v):
  for u in g[v]:
    if check[u]==1:
      continue
    check[u]=1
    count[u]+=count[v]
    dfs(u)
 

check[1] = 1
dfs(1)

print(*count[1:])

### FIXED CODE ###

import collections

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

g = [[] for i in range(n+1)]

for i in range(n-1):
    a,b = map(int,input().split())
    g[a].append(b)
    g[b].append(a)

count = [0] * (n+1)
check = [0] * (n+1)

for i in range(q):
    p,x = map(int,input().split())
    count[p] += x

q = collections.deque()  
q.append(1)

while q:
    v = q.pop()
    check[v] = 1
    for u in g[v]:
        if check[u] == 1:
            continue
        count[u] += count[v]
        q.append(u)
        
print(*count[1:])
# -*- coding: utf-8 -*-

n, k, q =map(int, input().split())

for i in range(q):
  a.append(int(input()))

m = [k]*n

for i in range(a):
  for j in range(n):
    m[j]=m[j]-1
    m[a-1]=m[a-1]+1
  
for i in range(n):
  if m[n]>0:
    print("Yes")
  else:
    print("No")

### FIXED CODE ###

# -*- coding: utf-8 -*-
 
n, k, q =map(int, input().split())
a = [int(input()) for i in range(q)]

p = [0]*(n+1)

for i in range(q):
  p[a[i]] += 1
  

for i in range(1,n+1):
  if p[i]>q-k:
    print("Yes")
  else:
    print("No")
N=int(input())
X=int(input())
T=int(input())
print((int(N//X)+1)*T)


### FIXED CODE ###

n,x,t=map(int,input().split())
if n%x==0:
  print(n//x*t)
else:
  print((n//x+1)*t)
N,M = map(int, input().split())
hune = sorted([list(map(int, input().split())) for _ in range(M)], key=lambda x:x[0])

for a,b in hune:
    if a == 1:
        for c,d in hune:
            if c == b and d == N:
                print('POSSIBLE')
                return
    if a == 2:
        break
print('IMPOSSIBLE')

### FIXED CODE ###

from collections import defaultdict


def check():
    N,M = map(int, input().split())
    B = []
    hune = defaultdict(list)
    for _ in range(M):
        a,b = map(int, input().split())
        if a == 1:
            B.append(b)
        hune[a].append(b)
    
    for b in B:
        for goal in hune[b]:
            if goal == N:
                print('POSSIBLE')
                return
    print('IMPOSSIBLE ')
    
check()