Harryxun/stf_run huggingface dataset:
N = int(input())
cake = 4
donut = 7
ac = False
for i in range(25):
    for j in range(14):
        if N == (cake * i + donut * j):
            ac = True
            exit()
if ac:
    print('Yes')
else:
    print('No)

### FIXED CODE ###

N = int(input())
cake = 4
donut = 7
ac = False
for i in range(25):
    for j in range(14):
        if N == (cake * i + donut * j):
            ac = True
if ac:
    print('Yes')
else:
    print('No')
A,B,C,D = input().split()
nums = list(range(int(A), int(B)+1))
tmp = [x for x in nums if not x%int(C) == 0 and not x%int(D) == 0]
print(len(tmp))

### FIXED CODE ###

import fractions

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
A,B,C,D = input().split()
A = int(A)-1
s = lcm(int(C),int(D))
#s = int(C)*int(D)
#numac = int(A)//int(C)#10//6 = 1
#numad = int(A)//int(D)#10//8 = 1
#numacd = int(A)//s#10//24 = 0
numa = int(A)//int(C) + int(A)//int(D) - int(A)//s
#numa = 1
#numbc = int(B)//int(C)#40//6 = 6
#numbd = int(B)//int(D)#40//8 = 5
#numbcd = int(B)//s#40//24= 1
numb = int(B)//int(C) + int(B)//int(D) - int(B)//s
#numb = 1
print(int(B)-int(A)-(numb - numa))
import numpy as np
import copy

N = int(input())
A = [int(i) for i in input().split()]
A = list(set(A))

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
def gcdover3(a):
    res = max(a)
    for idx in range(len(a)-1):
        res = min([gcd(a[idx],a[idx+1]),res])
    return res

if N<=2:
    print(max(A))
else:
    gcdss = []
    for i in range(len(A)):
        A_temp = copy.deepcopy(A)
        A_temp.pop(i)
        gcdss.append(gcdover3(A_temp))
    print(max(gcdss))
        

### FIXED CODE ###

N = int(input())
A = [int(i) for i in input().split()]
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a  
lgcds = [A[0]]
rgcds = [A[N-1]]
for n in range(N-2):
    lgcds.append(gcd(lgcds[-1],A[n+1]))
    rgcds.append(gcd(rgcds[-1],A[-2-n]))
gcds = [lgcds[-1],rgcds[-1]]
for i in range(N-2):
    gcds.append(gcd(lgcds[i],rgcds[-2-i]))
print(max(gcds))
N, M = map(int, input().split())
sc = [list(map(int, input().split())) for i in range(M)]
cnt = 0
ans = []
if N == 1:
  for i in range(10):
    i = str(i)
    for j in range(M):
      if i[sc[j][0] - 1] == str(c = sc[j][1]):
        cnt += 1
    if cnt == M:
      ans.append(int(i))
    cnt = 0
else:
  for i in range(10**(N-1), 10**N):
    i = str(i)
    for j in range(M):
      if i[sc[j][0] - 1] == str(sc[j][1]):
        cnt += 1
    if cnt == M:
      ans.append(int(i))
    cnt = 0

#print(ans)
print(min(ans) if ans else -1)

### FIXED CODE ###

N, M = map(int, input().split())
sc = [list(map(int, input().split())) for i in range(M)]

keta = [0,0,0]
DP = [0,0,0]

for i in sc:
  s = i[0]
  c = i[1]
  if DP[-1*N+s-1] == 0 or (DP[-1*N+s-1] == 1 and keta[-1*N+s-1] == c):
    keta[-1*N+s-1] = c
    DP[-1*N+s-1] = 1
  else:
    DP[-1*N+s-1] = -1
    
if keta[-1*N] == 0:
  if DP[-1*N] == 1 and N != 1:
    DP[-1*N] = -1
  elif N != 1:
    keta[-1*N] = 1
    DP[-1*N] = 1
  else:
    DP[-1*N] = 1
  
if -1 in DP:
  print(-1)
else:
  ans = ''
  for i in keta:
    ans += str(i)
  print(int(ans[3-N:]))
#print(DP)
age = int(input())
price = int(input())
if age >= 13:
    print(age, price)
elif 6 <= age <= 12 :
    print(price // 2)
else:
    print(0)

### FIXED CODE ###

a, b = [int(x) for x in input().split()]

cost = 0
if a >= 13:
    cost = b
elif a >= 6:
    cost = b / 2
else:
    cost = 0

print(int(cost))
import itertools

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

ok = [] #sから働ける日を抽出
for i in range(n):
  if s[i] == "o":
    ok.append(i)

kouho = list(itertools.combinations(ok, k))

sentaku = []
for i in range(len(kouho)):
  for j in range(k-1):
    if j == 0:
      kankaku = kouho[i][j+1] - kouho[i][j]
    else:
      kankaku = min(kankaku, kouho[i][j+1] - kouho[i][j])
  if kankaku >= c+1:
    sentaku.append(kouho[i])

sentaku1 = list(itertools.chain.from_iterable(sentaku))

for x in ok:
  if sentaku1.count(x) == len(sentaku):
    print(x+1)

### FIXED CODE ###

N,K,C = map(int,input().split())
S = str(input())

L = [] #0index
R = []
now = 0
times = 0
while times < K:
  #print(L)
  if S[now] == "o":
    L.append(now)
    now += C
    times += 1
  now += 1

now = N-1
times = 0
while times < K:
  if S[now] == "o":
    R.append(now)
    now -= C
    times +=1
  now -= 1
R.sort()

#print(L,R)
for i in range(K):
  if L[i] == R[i]:
    print(L[i]+1)
import sys
import math

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

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

##ラストが同一だったら先に入れ替えておく
count = 0

## 同一なら次と入れ替える
for i in range(n ):
    if a[i] is i + 1:
        a[i], a[i + 1] = a[i + 1], a[i]
        count += 1

print(count)


### FIXED CODE ###

# -*- coding: utf-8 -*-
n = int(input())
a = list(map(int, input().split()))  # 整数
count = 0
## 同一なら次と入れ替える
for i in range(n-1):
    if a[i] == i + 1:
        a[i], a[i + 1] = a[i + 1], a[i]
        count += 1
##ラストが同一だったら先に入れ替えておく
if a[n - 1] == n:
    count += 1

print(count)
a = list(map(int, input().split()))

if((a[0]+a[1]) == a[2]):
    print("0 0")

if((a[0]+a[1]) != a[2])
for i in range(0, a[2]):
    if(a[0] >= 1):
        a[0] -= 1

    elif(a[1] >= 1):
        a[1] -= 1

print("%d %d"%(a[0],a[1]))   

### FIXED CODE ###

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

t = a[0]-a[2]

if t<0:

    a[1] = a[1] +t
    if(a[1] < 0):
        a[1] = 0
    t = 0

print("%d %d"%(t,a[1]))
import math
n=int(input())
t=[int(input()) for _ in range(n)]

ans=t[0]

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

for i in range(1,n):
    ans=lcm(ans,t[i])
print(ans)
    

### FIXED CODE ###

import fractions
n=int(input())
t=[int(input()) for _ in range(n)]

ans=t[0]

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

for i in range(1,n):
    ans=lcm(ans,t[i])
print(ans)
import numpy as np

MOD = 10**9+7

n = int(input())
arr = np.zeros((n+1,n+1), dtype=np.int16)
for i in np.arange(3,n+1):
    arr[0,i] = 1

### FIXED CODE ###

import numpy as np

MOD = 10**9+7

n = int(input())
arr = np.zeros((n+1,n+1), dtype=int)
for i in np.arange(3,n+1):
    arr[0,i] = 1

for i in np.arange(1,n+1):
    sum_ = 0
    for j in np.arange(3*i,n+1):
        sum_ += arr[i-1,j]
        sum_ %= MOD
        if j+3 >= n + 1:
            break
        arr[i,j+3] = sum_

ans = 0
for i in range(n+1):
    ans += arr[i,n]
    ans %= MOD
print(ans)
d,n = map(int,input().split())

tmp = []
for i in range(1,100):
    tmp.append(i*100**d)
print(tmp[n])

### FIXED CODE ###

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

tmp = []
for i in range(1,100):
    tmp.append(i*100**d)
tmp.append(101*100**d)
print(tmp[n-1])
# その24
# ABC121 B - Can you solve this?

n,m,c=map(int,input().split())
B = np.array(list(map(int,input().split())))
K=[]
for i in range(n):
    A = list(map(int,input().split()))
    K.append(A)

import numpy as np
pp = np.array(K)
l = (pp*B).sum(axis=1)+c

t = 0
for i in range(len(l)):
    if l[i] > 0:
        t+=1
print(t)


### FIXED CODE ###

# その24
# ABC121 B - Can you solve this?

import numpy as np

n,m,c=map(int,input().split())
B = np.array(list(map(int,input().split())))
K=[]
for i in range(n):
    A = list(map(int,input().split()))
    K.append(A)

pp = np.array(K)
l = (pp*B).sum(axis=1)+c

t = 0
for i in range(len(l)):
    if l[i] > 0:
        t+=1
print(t)
import math
from itertools import accumulate
def is_prime(n):
  if n==2:
    return True
  for i in range(2,int(math.sqrt(n)+1)):
    if n%i==0:
      return False
  return True
q=int(input())
l=[0]*q
r=[0]*q
for i in range(q):
  l[i],r[i]=map(int,input().split())
min_l=min(l)
max_r=max(r)
a=[]
for i in range(min_l,max_r+1):
  if i%2==0:
    a.append(0)
  else:
    if is_prime(i) and is_prime((i+1)/2):
      a.append(1)
check=[0]+a
check=list(accumulate(check))
for i in range(q):
  print(check[r[i]-min_l+1]-check[l[i]-min_l])
  

### FIXED CODE ###

import math
from itertools import accumulate
def is_prime(n):
  if n==1:
    return False
  for i in range(2,int(math.sqrt(n)+1)):
    if n%i==0:
      return False
  return True
q=int(input())
l=[0]*q
r=[0]*q
for i in range(q):
  l[i],r[i]=list(map(int,input().split()))
min_l=min(l)
max_r=max(r)
a=[]
for i in range(min_l,max_r+1):
  if i%2==0:
    a.append(0)
  else:
    if is_prime(i) and is_prime((i+1)/2):
      a.append(1)
    else:
      a.append(0)
check=[0]+a
check=list(accumulate(check))
for i in range(q):
  print(check[r[i]-min_l+1]-check[l[i]-min_l])
x, a, b = map(int, input().split())

if abs(x-a) > abs(x-b):
  print(B)
else:
  print(A)

### FIXED CODE ###

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

if abs(x-a) > abs(x-b):
  print('B')
else:
  print('A')
import sys
import numpy as np
from functools import reduce

def subset(line):
    l = line.strip().split(" ")
    a = list(map(int, l))
    xy = list(map(lambda x: [x // 10, x % 10], a))
    dominos = [[1 if x != y and ([x, y] in xy or [y, x] in xy) else 0 \
                for x in range(0, 7)] for y in range(0, 7)]  
    digits = np.unique(np.sort(reduce(lambda x, y: x + y, xy)))
    return digits, dominos

def is_connected(d, g):
    a = np.array(g)
    z = np.zeros_like(a)
    b = a
    for i in range(1, z.shape[0]):
        z += b
        b = b.dot(a)
    zz = z[d[0]][d]
    return len(zz[zz == 0]) == 0
     
        
lno = 0
for line in sys.stdin:
    lno += 1
    if lno == 1:
        n = int(line)
    else:
        digits, dominos = subset(line)
        if not is_connected(digits, dominos):
            print("No")
        else:
            order = np.sum(dominos, axis = 0)
            order = order % 2
            if np.all(order == 0):
                print("Yes")
            elif len(order[order == 1]) <= 2:
                print("Yes")
            else:
                print("No")
        lno = 0


### FIXED CODE ###

import sys

def subset(line):
    l = line.strip().split(" ")
    a = list(map(int, l))
    xy = list(map(lambda x: [x // 10, x % 10], a))
    dominos = [[2 if [x, y] in xy and x == y else \
                1 if [x, y] in xy else \
                1 if [y, x] in xy else 0 \
                for x in range(0, 7)] for y in range(0, 7)] 
    digits = []
    for i in xy:
        digits.extend(i)
    digits = list(set(digits))
    digits.sort()
    return digits, dominos

def add_matrix(a, b):
    c = [[a[j][i] + b[j][i] for i in range(0, 7)] for j in range(0, 7)]
    return c

def mul_matrix(a, b):
    c = [[0 for i in range(0, 7)] for j in range(0, 7)]
    for j in range(0, 7):
        for i in range(0, 7):
            for k in range(0, 7):
                c[j][i] += a[j][k] * b[k][i]
    return c
                
def is_connected(d, g):
    a = g[:]
    z = [[0 for i in range(0, 7)] for j in range(0, 7)]
    b = a
    for i in range(0, 7):
        z = add_matrix(z, b)
        b = mul_matrix(b, a)
    zeros = 0
    for i in d:
        if z[d[0]][i] == 0:
            zeros += 1
    return zeros == 0
        
lno = 0
for line in sys.stdin:
    lno += 1
    if lno == 1:
        n = int(line)
    else:
        digits, dominos = subset(line)
        if not is_connected(digits, dominos):
            print("No")
        else:
            order = [sum(dominos[i]) for i in range(0, 7)]
            odd = 0
            for i in digits:
                if order[i] % 2 != 0:
                    odd += 1
            if odd <= 2:
                print("Yes")
            else:
                print("No")
        lno = 0
print((int(input())-1)*(int(input())-1))

### FIXED CODE ###

a,b=map(int,input().split())
print((a-1)*(b-1))
# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0585

"""
import sys
from sys import stdin
from math import sqrt
input = stdin.readline


def closest_part(points, n):
    # ?????¬???lp324???
    if n <= 1:
        return float('inf')
    m = n // 2
    x = points[m][0]
    d = min(closest_part(points, m), closest_part(points[m:], n-m))

    points.sort(key=lambda x:x[1])
    b = []
    for i in range(n):
        if abs(points[i][0] - x) >= d:
            continue
        for j in range(len(b)):
            dx = points[i][0] - b[-j-1][0]
            dy = points[i][1] - b[-j-1][1]
            if dy >= d:
                break
            d = min(d, (dx**2 + dy**2))
        b.append(points[i])
    return d


def main(args):
    n = int(input())
    points = [tuple(map(int, input().split())) for _ in range(n)]
    points.sort()               #  x????????§??????????????????

    result = closest_part(points, n)
    print(result)


if __name__ == '__main__':
    main(sys.argv[1:])
    

### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0585

"""
import sys
from sys import stdin
input = stdin.readline


def closest_part1(points, n):
    # ?????¬???p324???
    if n <= 1:
        return float('inf')
    m = n // 2
    x = points[m][0]
    d = min(closest_part1(points[:m], m), closest_part1(points[m:], n-m))

    points.sort(key=lambda x:x[1])
    b = []
    for i in range(n):
        if (points[i][0] - x)**2 >= d:
            continue
        for j in range(len(b)):
            dx = points[i][0] - b[-j-1][0]
            dy = points[i][1] - b[-j-1][1]
            if dy**2 >= d:
                break
            d = min(d, (dx**2 + dy**2))
        b.append(points[i])
    return d


def closest_part2(points, n):
    if n <= 1:
        return float('inf')
    m = n // 2
    x = points[m][0]
    d = min(closest_part2(points[:m], m), closest_part2(points[m:], n-m))
    points.sort(key=lambda p:p[1])
    b = []
    for p in points:
        if (p[0] - x)**2 >= d:
            continue
        for q in b:
            dx = p[0] - q[0]
            dy = p[1] - q[1]
            if dy**2 >= d:
                break
            d = min(d, (dx**2 + dy**2))
        b.insert(0, p)
    return d


def closest_part3(points, n):
    if n <= 1:
        return float('inf')
    m = n // 2
    x = points[m][0]
    d = min(closest_part3(points[:m], m), closest_part3(points[m:], n-m))
    points.sort(key=lambda p:p[1])
    b = []
    for p in points:
        if (p[0] - x)**2 >= d:
            continue
        for q in b[::-1]:
            dx = p[0] - q[0]
            dy = p[1] - q[1]
            if dy**2 >= d:
                break
            d = min(d, (dx**2 + dy**2))
        b.append(p)
    return d


def main(args):
    n = int(input())
    points = [tuple(map(int, input().split())) for _ in range(n)]
    points.sort()               #  x????????§??????????????????

    result = closest_part3(points, n)
    print(result)


if __name__ == '__main__':
    main(sys.argv[1:])
N=input()
S=list(input())
x=count=0
search_word=["A","B","C"]

for i in S:
  if S[x]==search_word[0] and S[x+1]==search_word[1] and S[x+2]==search_word[2]:
    count+=1
  x+=1

print(count)


### FIXED CODE ###

N=int(input())
S=list(input())
x=count=0
search_word=["A","B","C"]
 
for x in range(N-2):
  if S[x]==search_word[0] and S[x+1]==search_word[1] and S[x+2]==search_word[2]:
    count+=1
  x+=1
 
print(count)
n, m = map(int(), input().split())
if n == m:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

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

A=[[0,0,0]]
buf=[]
size = 0

def insert(A,x):
    global size,buf
    fp=A[0][1]
    try:
        if buf==[]:
            buf = [i for i,e in enumerate(A) if e==-1]
        else:
            i = buf[-1]
            buf = buf[:-1]
        A[i]=[x,fp,0]
        A[fp][2]=i
        A[0][1]=i
    except:
        A.append([x,fp,0])
        A[fp][2]=len(A)-1
        A[0][1]=len(A)-1     
    size += 1    

def delete(A,x):
    global size
    p =A[0][1]
    while A[p][0]!=x:
        p=A[p][1]
        if p==0: return
    fp=A[p][1]
    bp=A[p][2]
    A[fp][2]=bp
    A[bp][1]=fp
    A[p]=[-1,-1,-1]
    size -= 1
    return

def deletefirst(A):
    global size
    if size == 0: return
    p=A[0][1]
    fp=A[p][1]
    A[0][1]=fp
    A[fp][2]=0
    A[p]=[-1,-1,-1]
    size -= 1
    return 0

def deletelast(A):
    global size
    if size == 0: return
    p=A[0][2]
    bp=A[p][2]
    A[0][2]=bp
    A[bp][1]=0
    A[p]=[-1,-1,-1]
    size -= 1
    return 0

while int(raw_input())
    s = (raw_input().split())
    if s[0] == 'insert':
        insert(A,s[1])
    elif s[0] == 'delete':
        delete(A,s[1])
    elif s[0] == 'deleteFirst':
        deletefirst(A)
    elif s[0] == 'deleteLast':
        deletelast(A)
    n -=1
    
e = A[0][1]
while e!=0:
    print A[e][0],
    e = A[e][1]

### FIXED CODE ###

import sys,gc
    
A=[]
fp =0
bp =0

n=int(raw_input())
while n:
    s = raw_input()
    if s[0] == 'i':
        A.append(int(s[7:]))
        fp += 1
    elif s[6] == ' ':
        try:
            i = A[::-1].index(int(s[7:]))
            if i!=-1:
                del A[-i-1]
                fp -=1
        except:
            pass
    elif s[6] == 'F':
        A.pop()
        fp -=1
    elif s[6] == 'L':
        bp +=1
    n -=1

for e in A[bp:fp+1][::-1]:
    print int(e),
# -*- coding: utf-8 -*-
"""
Created on Fri Apr  5 17:16:14 2019

@author: adachi-lab
"""

input_1 = input()
S = input()
l = []
r = []


N = input_1.split()[0]
Q = input_1.split()[1]

for i in range(int(Q)):
    input_3 = input()
    l.append(int(input_3.split()[0]))
    r.append(int(input_3.split()[1]))

W = [(S[x-1:y]).count('AC') for (x, y) in zip(l, r)]

for i in range(len(W)):
    print(W[i])



### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Fri Apr  5 13:45:00 2019

@author: adachi-lab
"""

input_code = input()

list_1 = []

if input_code == 'A' or input_code == 'T':
    list_1 = ['A','T']
    list_1.remove(str(input_code))
    print(list_1[0])
    
else:
    list_1 = ['C','G']
    list_1.remove(str(input_code))
    print(list_1[0])
N = int(input())
A = list(map(int, input().split()))

result = "APPROVED"

for i in range(N):
    if (A[i] % 2 == 1) or ((A[i] % 2 == 0) and (A[i] % 3 == 0 or A[i] % 5 == 0)):
    else:
        result ="DENIED"
        break

###########　出力
print(result)

### FIXED CODE ###

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

result = "APPROVED"

for i in range(N):
    if not( (A[i] % 2 == 1) or ((A[i] % 2 == 0) and (A[i] % 3 == 0 or A[i] % 5 == 0)) ):
        result ="DENIED"
        break

###########　出力
print(result)
import math
N = int(input())
ans = 10
for A in range(1, int(math.sqrt(N))):
  if N % A == 0:
    B = N//A
    F = max(len(str(A)), len(str(B)))
    ans = F if ans > F
print(ans)

### FIXED CODE ###

import math
N = int(input())
ans = 10
for A in range(1, int(math.sqrt(N))+1):
  if N % A == 0:
    B = N//A
    F = max(len(str(A)), len(str(B)))
    if ans > F:
      ans = F 
print(ans)
n, m = map(int, input().split())
x = list(map(int, input().split()))

if m == 1:
    print('0')
    exit()
if n >= m:
    print(0)
    exit()
elif n == m-1:
    x = sorted(x)
    prev = x[0]
    diff = []
    for i, v in enumerate(x[1:]):
        diff.append([i, abs(prev-v)])
        prev = v

    diff = sorted(diff, key=lambda x: x[1], reverse=True)

    print(min(diff))

x = sorted(x)
prev = x[0]
diff = []
for i, v in enumerate(x[1:]):
    diff.append([i, abs(prev-v)])
    prev = v

diff = sorted(diff, key=lambda x: x[1], reverse=True)

split_index = list(map(lambda x: x[0]+1, diff[:n-1]))

ans = x[split_index[-1]:][-1] - x[split_index[-1]:][0]
index_from = 0
for i in range(n-1):
    index_to = split_index[i]
    ans += (x[index_from:index_to][-1] - x[index_from:index_to][0])
    index_from = index_to
print(ans)

### FIXED CODE ###

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

if n >= m:
    print(0)
    exit()

a = sorted(a)
diff = []
for i in range(1, m):
    diff += [abs(a[i] - a[i-1])]

diff = sorted(diff, reverse=True)

ans = a[-1] - a[0]
for i in range(n-1):
    ans -= diff[i]

print(ans)
n, q = map(int, input().split())
ab_lst = [list(map(int, input().split())) for _ in range(n-1)]
px_lst = [list(map(int, input().split())) for _ in range(q)]

res = [0] * (n+1)
neighbor = [[] for _ in range(n+1)]
for edge in ab_lst:
    neighbor[edge[0]].append(edge[1])

def counter_add(root, v):
    res[root] += v
    if neighbor[root] != []:
        for i in neighbor[root]:
            counter_add(i, v)

for px in px_lst:
    counter_add(px[0], px[1])
    
for i in res[1:]:
    print(i, end=" ")

### FIXED CODE ###

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

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

root_value = [0] * (n+1)
for i in range(q):
    p, x = map(int, input().split())
    root_value[p] += x

res = [0] * (n+1)
queue = [(1, root_value[1])]
while len(queue) > 0:
    pair = queue.pop()
    res[pair[0]] += pair[1]
    if neighbor[pair[0]] != []:
        for i in neighbor[pair[0]]:
            queue.append((i, pair[1] + root_value[i]))
    
for i in res[1:]:
    print(i, end=" ")
A, B, T = map(int, input.split())

print((T+0.5) // A * B)

### FIXED CODE ###

# coding: utf-8

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

def biscuit_generator(a, b, t):
    biscuit = 0
    t -= a
    while (t+0.5) > 0:
      biscuit += b
      t -= a

    return biscuit

print(biscuit_generator(A, B, T))
N=int(input())
H=list(map(int,input().split()))
A,a=0,0
C=[0]*N
H=H[-1:0:-1]
for i in range(N):
  if H[i]>=H[i+1]:
    A+=1
  else:
    C[a]=A
    a+=1
    A=0
print(max(C))


### FIXED CODE ###

N=int(input())
H=list(map(int,input().split()))
A,a=0,0
C=[0]*N
H=H[::-1]
for i in range(N-1):
  if H[i]<=H[i+1]:
    A+=1
  else:
    C[a]=A
    a+=1
    A=0
C[a]=A
print(max(C))
N=iintnt(input())
A=int(input())
black_cell=N**2-A
print(black_cell)

### FIXED CODE ###

N=int(input())
A=int(input())
black_cell=N**2-A
print(black_cell)
S,W=map(int,intput().split())
if S<=W:
  print("unsafe")
else:
  print("safe")

### FIXED CODE ###

S,W=map(int,input().split())
if S<=W:
  print("unsafe")
else:
  print("safe")
class FixedSizeQueue:
    def __init__(self, n, init_val):
        self.queue = [init_val] * n #根にサイズを負の値で格納する。
        self.l = 0
        self.r = 0
        self.n = n
        self.size = 0
    def append(self, val):
        if self.size == self.n:
            raise IndexError('fixed-size-queue is full')
        self.queue[self.r] = val
        self.r = (self.r + 1) % self.n
        self.size += 1

    def popleft(self):
        if self.size == 0:
            raise IndexError('dequeue from empty queue')
        val = self.queue[self.l]
        self.l = (self.l + 1) % self.n
        self.size -= 1
        return val

    def pop(self):
        if self.size == 0:
            raise IndexError('dequeue from empty queue')
        val = self.queue[self.r - 1]
        self.r = (self.r - 1) % self.n
        self.size -= 1
        return val
    
    def get_size(self):
        return self.size
    
    def __bool__(self):
        return self.size != 0

def fast_bellman_ford(n, s, graph, edge_n, init_val): #どう？
    d = [init_val] * n
    d[s] = 0
    q = FixedSizeQueue(edge_n, 0)
    q.append(s)
    for _ in range(n):
        m = q.get_size()
        for _ in range(m):
            vf = q.popleft()
            for vt, w in graph[vf]:
                if d[vt] > d[vf] + w:
                    d[vt] = d[vf] + w
                    q.append(vt)
        if not q:
            break
    if q: #閉路の存在
        minus_inf = -float('inf')
        while q:
            m = q.get_size()
            for _ in range(m):
                vf = q.popleft()
                for vt, w in graph[vf]:
                    if d[vt] > d[vf] + w:
                        d[vt] = minus_inf
                        q.append(vt)
    return d

n, m = map(int, input().split())
graph = [[] for _ in range(n)]
for i in range(m):
    a, b, w = map(int, input().split())
    graph[a-1].append((b-1, -w))
d = fast_bellman_ford(n, 0, graph, m, float('inf'))
print(-d[-1] if d[-1] != -float('inf') else 'inf')


### FIXED CODE ###

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

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

init_val = -10 ** 9 * 1000
d = [init_val] * n
d[0] = 0
for _ in range(n):
    updated = False
    for a, b, w in edges:
        if d[a] != init_val and d[b] < d[a] + w:
            d[b] = d[a] + w
            updated = True
    if not updated:
        break
if updated: #閉路の存在
     for a, b, w in edges:
        if d[a] != init_val and d[b] < d[a] + w:
            d[b] = d[a] + w
            if b == n - 1:
                print('inf')
                quit()
print(d[n-1])