Harryxun/stf_run huggingface dataset:
# Python program to print all paths from a source to destination. 
cnt=0 
ans=0 
from collections import defaultdict 
from collections import Counter 
def check(arr): 
    #print(arr)
    ans=0 
    for i in range(1,len(arr)):
        ans+=e[(arr[i-1],arr[i])]
   # print(ans)
    return ans 
maxi=-10**1999  
mini=10**9 
#    sents a directed graph 
# using adjacency list representation 
class Graph: 

	def __init__(self,vertices): 
		#No. of vertices 
		self.V= vertices 
		
		# default dictionary to store graph 
		self.graph = defaultdict(list) 

	# function to add an edge to graph 
	def addEdge(self,u,v): 
		self.graph[u].append(v) 
	def printAllPathsUtil(self, u, d, visited, path):
	   
		# Mark the current node as visited and store in path 
		visited[u]= True
		path.append(u) 
		global ans 
		global maxi
		# If current vertex is same as destination, then print 
		# current path[] 
		if u ==d: 
		   # print(path)
		    if check(path): 
		        maxi=max(maxi,check(path))
		else: 
			# If current vertex is not destination 
			#Recur for all the vertices adjacent to this vertex 
			for i in self.graph[u]: 
				if visited[i]==False: 
					self.printAllPathsUtil(i, d, visited, path) 
					
		# Remove current vertex from path[] and mark it as unvisited 
		path.pop() 
		visited[u]= False


	# Prints all paths from 's' to 'd' 
	def printAllPaths(self,s, d): 

		# Mark all the vertices as not visited 
		visited =[False]*(self.V) 

		# Create an array to store paths 
		path = [] 

		# Call the recursive helper function to print all paths 
		self.printAllPathsUtil(s, d,visited, path) 



# Create a graph given in the above diagram 
n,m=map(int,input().split())
g = Graph(n)
e={}
from collections import defaultdict
di=defaultdict(list)
for i in range(m): 
    a,b,c=map(int,input().split())
    g.addEdge(a-1,b-1)
    e[(a-1,b-1)]=c 
    a-=1 
    b-=1 
    di[a].append(b)
    #g.addEdge(b-1,a-1)

s=0 
d=n-1 
q=[n-1]
vis=[0]*n 
vis[n-1]=1 
while q:
    t=q.pop(0)
    for i in di[t]:
        if not vis[i]:
            q.append(i)
            vis[i]=1 
f=1 
if vis[0]:
    f=0 
g.printAllPaths(s, d) 
print(maxi if f else 'inf')


### FIXED CODE ###

inf=10**43
n,m=map(int,input().split())
edges=[None]*m 
for i in range(m):
    a,b,c=map(int,input().split())
    a-=1 
    b-=1 
    edges[i]=(a,b,-c)
d=[inf]*n 
f=1 
d[0]=0 
for i in range(n-1): 
    for (a,b,c) in edges: 
        if d[a]+c<d[b]:
            d[b]=d[a]+c #update distances 
#print(d)
for i in range(n):
    for (a,b,c) in edges: 
        if d[b]>d[a]+c:  #how can a->b be minimised by travelling 
                         #some other path
            if b==n-1:
                f=0
                #print(b,d[b])
            else:
                d[b]=d[a]+c 
if f:  
    print(-d[n-1])
else:
    print('inf')
S = input()
T = input()

i = 0
j = 0
ss = list()
tt = list()
slist = list()
tlist = list()

if len(S) == len(T):
   for s in S:
      if s in slist:
         ss.append(slist[s])
      else:
         ss.append(i)
         slist.append(s)
         i += 1

   for t in T:
      if t in tlist:
         tt.append(tlist[t])
      else:
         tt.append(j)
         tlist.append(t)
         j += 1

   if ss == tt:
      print("Yes")
   else:
      print("No")
else:
   print("No")
      
      
         


### FIXED CODE ###

S = input()
T = input()

i = 0
j = 0
ss = list()
tt = list()
slist = list()
tlist = list()

if len(S) == len(T):
   for s in S:
      if s in slist:
         ss.append(slist.index(s))
      else:
         ss.append(i)
         slist.append(s)
         i += 1

   for t in T:
      if t in tlist:
         tt.append(tlist.index(t))
      else:
         tt.append(j)
         tlist.append(t)
         j += 1

   if ss == tt:
      print("Yes")
   else:
      print("No")
else:
   print("No")
import sys

while True:
    n = int(input())
    if n == 0:
        break;
    x = {}
    for i in range(n):
        k,v = sys.stdin.readline().rstrip().split()
        x[k] = v
    y = []
    for i in range(int(input()):
        a = sys.stdin.readline().rstrip()
        if a in x:
            y.append(x[a])
        else:
            y.append(a)
    print(''.join(y))

### FIXED CODE ###

while True:
    n = int(input())
    if n == 0:
        break;
    x = {}
    for i in range(n):
        k,v = input().split()
        x[k] = v
    y = []
    for i in range(int(input())):
        a = input().rstrip()
        if a in x:
            y.append(x[a])
        else:
            y.append(a)
    print(''.join(y))
a, b, c = int(input().split())
print(min(a*b,c))

### FIXED CODE ###

n, b, c = map(int, input().split())
print(min(n*b, c))
n, *A = map(int, open(0).read().split())
c = [0]*9
for a in A:
  c[min(8, a//400)] += 1

cl = 8-c[:-1].count(0)
cmin = max(1, cl)
cmax = min(cl+c[8])
print(cmin, cmax)

### FIXED CODE ###

n, *A = map(int, open(0).read().split())
c = [0]*9
for a in A:
  c[min(8, a//400)] += 1

cl = 8-c[:-1].count(0)
cmin = max(1, cl)
cmax = cl+c[8]
print(cmin, cmax)
i = list(map(int, input().split()))
j = list(map(int, input().split()))
if i[0]<=sum(j):
  print(Yes)
else:
  print(No)

### FIXED CODE ###

i = list(map(int, input().split()))
j = list(map(int, input().split()))
if i[0]<=sum(j):
  print("Yes")
else:
  print("No")
# ABC100 B - Ringo's Favorite Numbers 
d,n = map(int,input().split())
l = []
dd = 0
def mod(x,t):
    while x >= 100:
        if x%100 == 0:
            t +=1
        x = x//100
    return t

if d == 0:
    for i in range(1,101):
        dd = mod(i,0)
        if d == dd:
            l.append(i)
elif d == 1:
    for i in range(0,10001,100):
        if i > 0:
            dd = mod(i,0)
            if d == dd:
                l.append(i)
elif d == 2:
    for i in range(0,1000001,10000):
        if i > 0:
            dd = mod(i,0)
            if d == dd:
                l.append(i)

print(l[n-1])

### FIXED CODE ###

# ABC100 B - Ringo's Favorite Numbers 
d,n = map(int,input().split())
ans = 100**d * n
if n==100:
  ans +=100**d
print(ans)
s = input()
l = []
for i in range(len(s)):
    a = s[i]
    l.append(a)
ans = 0
for j in range(1,len(s)+1):
    if l[j] == l[j-1]:
        ans += 1
    else:
        ans += 0
if ans == 0:
    print('yes')
else:
    print('no')


### FIXED CODE ###

s = input()
if len(s) == len(set(s)):
  print('yes')
else:
  print('no')
#! python3
# card_game.py

n = int(input())
turns = [input() for i in range(n)]

taro, hanako = 0, 0
for turn in turns:
    t, h = turn.split(' ')
    min_len = len(t) if len(t) <= len(h) else len(h)

    win_flag = 0 # -1: taro, 1: hanako, 0: draw
    for i in range(min_len):
        if ord[t] < ord[h]:
            win_flag = 1
        elif ord[h] < ord[t]:
            win_flag = -1

    if win_flag == 0:
        if len(t) < len(h):
            win_flag = 1
        elif len(h) < len(t):
            win_flag = -1

    if win_flag == -1:
        taro += 3
    elif win_flag == 1:
        hanako += 3
    else:
        taro += 1
        hanako += 1

print(taro, hanako)


### FIXED CODE ###

#! python3
# card_game.py

n = int(input())
turns = [input() for i in range(n)]

taro, hanako = 0, 0
for turn in turns:
    t, h = turn.split(' ')
    min_len = len(t) if len(t) <= len(h) else len(h)

    win_flag = 0 # -1: taro, 1: hanako, 0: draw
    for i in range(min_len):
        if ord(t[i]) < ord(h[i]):
            win_flag = 1
            break
        elif ord(h[i]) < ord(t[i]):
            win_flag = -1
            break

    if win_flag == 0:
        if len(t) < len(h):
            win_flag = 1
        elif len(h) < len(t):
            win_flag = -1

    if win_flag == -1:
        taro += 3
    elif win_flag == 1:
        hanako += 3
    else:
        taro += 1
        hanako += 1

print(taro, hanako)
N, M = map(int, input().split())
a = [int(input()) for j in range(M)]

#dp[i]:i段目までの上がり方

div = 1000000007

dp = [0] * (N+1)
dp[0] = 1
if not 1 in a:
    dp[1] = 1
else:
    del a[0]

def stairs():
    for i in range(N-1):
        if dp[i+1] == 0 and dp[i] == 0:
            break
        if i+2 != a[0]:
            del a[0]
        else:
            dp[i+2] = (dp[i+1] + dp[i]) % div
    print(dp[N])

stairs()

### FIXED CODE ###

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

#dp[i]:i段目までの上がり方

div = 1000000007

dp = [0] * (N+1)
dp[0] = 1
if not 1 in a:
    dp[1] = 1
else:
    del a[0]

def stairs():
    for i in range(N-1):
        if dp[i+1] == 0 and dp[i] == 0:
            break
        if a:
            if i+2 == a[0]:
                del a[0]
                continue
        dp[i+2] = (dp[i+1] + dp[i]) % div
    print(dp[N])

stairs()
input1 = input()
N = int(input1)
input2 = input()
S = input2
 
R = 0
B = 0
h = 'No'
 
for i in N:
  if S[i] == 'R':
    R += 1
  else:
    B += 1
  
if R > B:
  h = 'Yes'

print(h)

### FIXED CODE ###

input1 = input()
N = int(input1)
input2 = input()
S = list(input2)
 
R = 0
B = 0
h = 'No'
 
for i in range(N):
  if S[i] == 'R':
    R += 1
  else:
    B += 1
  
if R > B:
  h = 'Yes'

print(h)
a = int(input())
b= int(input())
c = int(input())
d = int(input())
e = int(input())


la = [a//10*10-a,b//10*10-b,c//10*10-c,d//10*10-d,e//10*10-e].sort()
print(sum([a,b,c,d,e])+sum(la[:-1]))

### FIXED CODE ###

a = int(input())
b= int(input())
c = int(input())
d = int(input())
e = int(input())
l = [] 
for i in [a,b,c,d,e]:
    if i % 10 != 0: 
        l.append(i//10*10+10-i)
print(sum([a,b,c,d,e])+sum(sorted(l)[:-1]))
N = int(input())
S = input()

red = 0
blue = 0
for s in S:
    if s == 'R':
        red++
    else:
        blue++

if red > blue:
    print('Yes')
else
    print('No')

### FIXED CODE ###

N = int(input())
S = input()

red = 0
blue = 0
for s in S:
    if s == 'R':
        red = red+1
    else:
        blue = blue+1

if red > blue:
    print('Yes')
else:
    print('No')
import math

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

print(a * b // math.gcd(a, b))

### FIXED CODE ###

from fractions import gcd

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

print(a * b // gcd(a, b))
class BIT_RSQ():
    def __init__(self, n):
        self.n = n
        self.data = [0]*(n+1)

    def add(self, i, v):
        while i <= self.n:
            self.data[i-1] += v
            i += i & -i

    def sum(self, i):
        ret = 0
        while(i > 0):
            ret += self.data[i-1]
            i -= i & -i
        return ret

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

def check(m):
    b = [[-1,1][i>=m] for i in a]
    bit = BIT_RSQ(2*n+1)
    s = [0] + list(accumulate(b))
    res = 0
    for i in range(n):
        bit.add(s[i]+n+1, 1)
        res += bit.sum(s[i+1]+n+1)
    return res >= (n*(n+1)//2+1)//2

left = 0
right = 10**9+1
while right-left > 1:
    mid = (right+left)//2
    if check(mid):
        left = mid
    else:
        right = mid
print(left)

### FIXED CODE ###

from itertools import accumulate

class BIT_RSQ():
    def __init__(self, n):
        self.n = n
        self.data = [0]*(n+1)

    def add(self, i, v):
        while i <= self.n:
            self.data[i-1] += v
            i += i & -i

    def sum(self, i):
        ret = 0
        while(i > 0):
            ret += self.data[i-1]
            i -= i & -i
        return ret

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

def check(m):
    b = [[-1,1][i>=m] for i in a]
    bit = BIT_RSQ(2*n+1)
    s = [0] + list(accumulate(b))
    res = 0
    for i in range(n):
        bit.add(s[i]+n+1, 1)
        res += bit.sum(s[i+1]+n+1)
    return res >= (n*(n+1)//2+1)//2

left = 0
right = 10**9+1
while right-left > 1:
    mid = (right+left)//2
    if check(mid):
        left = mid
    else:
        right = mid
print(left)
N, K = map(int, input().split())
a = list(map(int, input().split()))

min_time = 2 * 10 ** 8
for i in range(N):
    print(i)
    if i + K > N:
        break
    if a[i] > 0:
        min_time = min(min_time, abs(a[i + K - 1]))
        break
    
    if a[i + K - 1] < 0:
        if i + K <= N and a[i + K] > 0:
            min_time = min(min_time, abs(a[i]))
        continue
        
    min_time = min(min_time, 2 * abs(a[i]) + abs(a[i + K - 1]), abs(a[i]) + 2 * abs(a[i + K - 1]))

print(min_time)

### FIXED CODE ###

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

min_time = 10 ** 12
for i in range(N):
    if i + K > N:
        break
    if a[i] > 0:
        min_time = min(min_time, abs(a[i + K - 1]))
        break
    
    if a[i + K - 1] < 0:
        if (i + K < N and a[i + K] > 0) or i + K == N:
            min_time = min(min_time, abs(a[i]))
        continue
        
    min_time = min(min_time, 2 * abs(a[i]) + abs(a[i + K - 1]), abs(a[i]) + 2 * abs(a[i + K - 1]))

print(min_time)
def sugoroku(m, d):
    d = [0] + d + [0]
    start, goal = 0, len(d) - 1

    g = [[0 for j in range(len(d))] for i in range(len(d))]
    for i in range(len(d) - 1):
        for mi in range(1, m + 1):
            pos = min(goal, i + mi)
            pos = max(start, pos + d[pos])
            g[i][pos] = 1

    for k in range(len(d)):
        for i in range(len(d)):
            for j in range(len(d)):
                if g[i][k] and g[k][j]:
                    g[i][j] = 1
    
    for i in range(len(d) - 1):
        if g[start][i] and not g[i][goal]:
            return False
    return True

import sys
f = sys.stdin


while True:
    m = int(f.readline())
    if m == 0:
        break
    d = [int(f.readline()) for _ in range(int(f.readline()))]
    print('OK' if sugoroku(m, d) else 'NG')

### FIXED CODE ###

def reachable(graph, init):
    if init not in graph or graph[init] is None:
        return set()
    
    tmp,  graph[init] = graph[init], None

    return tmp.union(* [reachable(graph, i) for i in tmp])

def sugoroku(m, d):
    d = [0] + d + [0]
    start, goal = 0, len(d) - 1

    graph_to = {goal:{goal}}
    graph_from = {start:{start}}
    
    for init in range(len(d) - 1):
        for xi in range(1, 1 + m):
            pos = min(init + xi, goal)
            to = max(start, min(pos + d[pos],goal))
            try:
                graph_to[to].add(init)
            except KeyError:
                graph_to[to] = {init}
            try:
                graph_from[init].add(to)
            except KeyError:
                graph_from[init] = {to}
    
    unreachable_node = reachable(graph_from, start).difference(reachable(graph_to, goal))
    
    return 0 == len(unreachable_node)

import sys
f = sys.stdin

while True:
    m = int(f.readline())
    if m == 0:
        break
    d = [int(f.readline()) for _ in range(int(f.readline()))]
    print('OK' if sugoroku(m, d) else 'NG')
def gcd(a,b):
    while b:a,b=a,a%b
    return a
def lcm(a,b):
    return a*b//gcd(a,b)

N = int(input())
A = tuple(map(int,input().split(" ")))
ans = 0
mod = 10**9+7
l = 1
for i in range(N):
    l = lcm(l,A[i])
l %= mod

for i in A:
    ans += l//A[i]
    ans %= mod

print(ans)

### FIXED CODE ###

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

N = int(input())
A = tuple(map(int,input().split(" ")))
ans = 0
mod = 10**9+7
l = 1
for i in range(N):
    l = lcm(l,A[i])
l %= mod

for i in A:
    ans += l*pow(i,mod-2,mod)
    ans %= mod

print(ans)
def mi():return map(int,input().split())
n,m=mi()
n=pow(2,n)-1
m=pow(2,m)-1

for i in range(n):
    if i==0 or i==n-1:
        print("1"*m)
    else:
        if i%2==1:
            print("1"*m)
        else:
            print("1"+"0"*(m-2)+"1")


### FIXED CODE ###

def mi():return map(int,input().split())

# n=int(input())
# a,b=mi()
s=input()
# l=list(mi())

ans=["hi","hihi","hihihi","hihihihi","hihihihihi"]
if s in ans:
    print("Yes")
else:
    print("No")
a,b=int(x) for x in input().split(' ')
print("error" if a+b>=10 else a+b)

### FIXED CODE ###

a,b=[int(x) for x in input().split(' ')]
print("error" if a+b>=10 else a+b)
import numpy as np
h, w = map(int, input().split())

A = []
for i in range(h):
    s = list(input())
    if len(set(s)) == 1 and s[0] == ".":
        continue
    else:
        A.append(s)
B = A
c = 0
for i in range(w):
    s = []
    for j in range(len(A)):
        s.append(A[j][i])
    if len(set(s)) == 1 and s[0] == '.':
        B = np.delete(B, i-c, 1)
        c += 1


for i in B:
    a = ""
    for j in i:
        a += j
    print(a)

### FIXED CODE ###

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

print(a-b+1)
n,u,v = map(int,input().split())
u-=1
v-=1
ki = [[]for i in range(n)]
distt = [0]*n
dista = [0]*n
for i in range(n-1):
    a,b = map(int,input().split())
    a -= 1
    b -= 1
    ki[a].append(b)
    ki[b].append(a)
def dfst(now,last = -1):
    for next in ki[now]:
        if next == last:continue
        distt[next] = distt[now]+1
        dfst(next,now)
def dfsa(now,last = -1):
    for next in ki[now]:
        if next == last:continue
        dista[next] = dista[now]+1
        dfsa(next,now)
    
dfst(u)
dfsa(v)
ans = 0
for i in range(n):
    if dista[i]<=distt[i]:continue
    ans = max(ans,dista[i]-1)
print(ans)
    

### FIXED CODE ###

import sys

sys.setrecursionlimit(10**7)
n,u,v = map(int,input().split())
u-=1
v-=1
ki = [[]for i in range(n)]
distt = [0]*n
dista = [0]*n
for i in range(n-1):
    a,b = map(int,input().split())
    a -= 1
    b -= 1
    ki[a].append(b)
    ki[b].append(a)
def dfst(now,last = -1):
    for next in ki[now]:
        if next == last:continue
        distt[next] = distt[now]+1
        dfst(next,now)
def dfsa(now,last = -1):
    for next in ki[now]:
        if next == last:continue
        dista[next] = dista[now]+1
        dfsa(next,now)
    
dfst(u)
dfsa(v)
ans = 0
for i in range(n):
    if dista[i]<=distt[i]:continue
    ans = max(ans,dista[i]-1)
print(ans)
arr = list(map(int,input().split()))
A=int(arr[0])
B=int(arr[1])
H=int(arr[2])
M=int(arr[3])

kakudo_H = H*30 +M*0.5
kakudo_M = M*6
if M==0:
    kakudo_M=360

kakudo_sa=abs(kakudo_H-kakudo_M)
# cはまずは2条している値としてセット
c=A**2 +B**2-2*A*B*(math.cos(math.radians(kakudo_sa)))
C=c**0.5
print(C)

### FIXED CODE ###

import math
A,B,H,M=input().split()

A=int(A)
B=int(B)
H=int(H)
M=int(M)

kakudo_H = H*30 +M*0.5
kakudo_M = M*6
if M==0:
    kakudo_M=360

kakudo_sa=abs(kakudo_H-kakudo_M)
# cはまずは2条している値としてセット
c=A**2 +B**2-2*A*B*(math.cos(math.radians(kakudo_sa)))
C=c**0.5
print(C)
s = input().split()
if len(s) == 2:
  print(1,1)
  exit()
chk = [0]*len(s)
cntR = 1
r = 0
cntL = 0
for i in range(len(s)-1):
  if s[i] == 'R' and s[i+1] == 'L':
    r = i
    chk[r] += (cntR+1)//2
    chk[r+1] += (cntR)//2
    cntL = 1
  if s[i] == 'R' and s[i+1] == 'R':
    cntR += 1
  if s[i] == 'L' and s[i+1] == 'L':
    cntL += 1
  if s[i] == 'L' and s[i+1] == 'R':
    chk[r] += (cntL)//2
    chk[r+1] += (cntL+1)//2
    cntL = 0
    cntR = 1
chk[r] += (cntL)//2
chk[r+1] += (cntL+1)//2
chk = list(map(str,chk))
print(' '.join(chk))

### FIXED CODE ###

s = input()
if len(s) == 2:
  print(1,1)
  exit()
chk = [0]*len(s)
cntR = 1
r = 0
cntL = 0
for i in range(len(s)-1):
  if s[i] == 'R' and s[i+1] == 'L':
    r = i
    chk[r] += (cntR+1)//2
    chk[r+1] += (cntR)//2
    cntL = 1
  if s[i] == 'R' and s[i+1] == 'R':
    cntR += 1
  if s[i] == 'L' and s[i+1] == 'L':
    cntL += 1
  if s[i] == 'L' and s[i+1] == 'R':
    chk[r] += (cntL)//2
    chk[r+1] += (cntL+1)//2
    cntL = 0
    cntR = 1
chk[r] += (cntL)//2
chk[r+1] += (cntL+1)//2
chk = list(map(str,chk))
print(' '.join(chk))
o=input()
e=input()
pw=""
for i in range(len(o)+len(e)):
  if i%2==0:
    pw=pw+e[i//2]
  else:
    pw=pw+o[i//2]
print(pw)

### FIXED CODE ###

o=input()
e=input()
pw=""
for i in range(len(o)+len(e)):
  if i%2==0:
    pw=pw+o[i//2]
  else:
    pw=pw+e[i//2]
print(pw)
s=list(input())
k=int(input())
count=0
re=""
for i in range(1,len(s)):
    if s[i]==s[i-1]:
        if i==len(s)-1:
            re=s[-1]
        s[i]="A"
        count +=1

if s[0]==s[-1]:
    count +=1
    re=s[-1]
    s[-1]="A"

if (s[-1]=="A") and (s[-2]!=re):
    print((count*k)-1)
    exit()
print(count*k)

### FIXED CODE ###

s=list(input())
k=int(input())
A,B,C=0,0,0
test=s*3
for i in range(len(s)*3-1):
    if test[i]==test[i+1]:
        test[i+1]="A"
A=test[:len(s)].count("A")
B=test[len(s):len(s)*2].count("A")
C=test[len(s)*2:len(s)*3].count("A")

if s.count(s[0])==len(s):
    print((len(s)*k)//2)
else:
    if k==1:print(A)
    elif k==2:print(A+B)
    else:print(A+B*(k-2)+C)
import fractions
n = int(input())
A = list(map(int, input().split()))
min_A = min(A)
for i in range(n):
  A[i] = A[i]%min_A
if all(A[i] == 0 for i in range(n)):
  print(min_A)
else:
  print(fractions.gcd(A[j] for j in range(n)))

### FIXED CODE ###

import fractions
n = int(input())
A = list(map(int, input().split()))
min_A = min(A)
B = []
for i in range(n):
  B.append(A[i]%min_A)
if all(B[i] == 0 for i in range(n)):
  print(min_A)
else:
  m = A[0]
  for i in range(1,n):
    m = fractions.gcd(m, A[i])
  print(m)
N = int(input())
dp = [0]*100000
dp[100] = 1
dp[101] = 1
dp[102] = 1
dp[103] = 1
dp[104] = 1
dp[105] = 1
for i in range(200, N+1):
    if dp[i-100]==1 or dp[i-101]==1 or dp[i-102]==1 or dp[i-103]==1 or dp[i-104]==1  or dp[i-105]==1:
        dp[i]=1
print(dp[N])

### FIXED CODE ###

N = int(input())
dp = [0]*(100000+1)
dp[100] = 1
dp[101] = 1
dp[102] = 1
dp[103] = 1
dp[104] = 1
dp[105] = 1
for i in range(200, N+1):
    if dp[i-100]==1 or dp[i-101]==1 or dp[i-102]==1 or dp[i-103]==1 or dp[i-104]==1  or dp[i-105]==1:
        dp[i]=1
print(dp[N])
import numpy as np
import sys
input = sys.stdin.readline

def dfs(v,G,visit):
    visit[v-1]=1    
    for next in G[v-1]:        
        if visit[next-1]:
            continue
        if dfs(next,G,visit) == True:
            return True  
 
N, M =map(int, input().split())
G  = [[] for _ in range(N)]
for i in range(M):
    a,b ,_= map(int, input().split())
    G[a-1].append(b)
    G[b-1].append(a)
 
count = 0

visit = np.array([0]*N)
for i in range(1,N+1):
  if visit[i-1]:
    continue
  if G[i-1]:  
    _ = dfs(i,G,visit)
  else:
    visit[i-1] = 1
  count += 1

print(count)

### FIXED CODE ###

import numpy as np
import sys
sys.setrecursionlimit(10**5+1)
input = sys.stdin.readline

def dfs(v,G,visit):
    visit[v-1]=1    
    for next in G[v-1]:        
        if visit[next-1]:
            continue
        _ = dfs(next,G,visit) 
 
N, M =map(int, input().split())
G  = [[] for _ in range(N)]
for i in range(M):
    a,b ,_= map(int, input().split())
    G[a-1].append(b)
    G[b-1].append(a)
 
count = 0

visit = np.array([0]*N)
for i in range(1,N+1):
  if visit[i-1]:
    continue
  if G[i-1]:  
    _ = dfs(i,G,visit)
  else:
    visit[i-1] = 1
  count += 1

print(count)
n = int(input())
l = sorted(map(int, input().split()), reverse = True)

alice = 0
bob = 0
ab = False
for i in l:
  if ab == False:
	alice += i
    ab = True
  else:
    bob += i
    ab = False
    
print(alice - bob)
  

### FIXED CODE ###

n = int(input())
l = sorted(map(int, input().split()), reverse = True)

alice = 0
bob = 0
ab = False
for i in l:
  if ab == False:
    alice += i
    ab = True
  else:
    bob += i
    ab = False
    
print(alice - bob)
x, y = [int(x) for x in input().split()]
if 4 * x >= y and (y%4 ==0 or (y %2 == 0 and (y-2)%4==0)):
  print("Yes")
else:
  print("No")


### FIXED CODE ###

a = [int(x) for x in input().split()]
for i in range(5):
  if a[i] == 0:
    print(i+1)
    exit(0)
import sympy

N = int(input())

S = 0
for i in range(1,N+1):
    S += i * len(sympy.divisors(i))
print(S)

### FIXED CODE ###

# ABC172_D
N = int(input())
ans = 0

for i in range(1,N+1):
	ans += ((N//i)*(i+(N//i)*i))/2

print(int(ans))
N=int(input())
a=list(map(int,input().split()))
s=[]
for i in range(max(a)):
  m=0  
  for j in range(0,len(a)):
    m+=(a[j]-i)**2
  s.append(m)
print(min(s))    


### FIXED CODE ###

N,R=map(int,input().split())
u=0
if N>=10:
  u=R
else:
  u=R+100*(10-N)
print(u)
A, B, C = map(int, input().split())

for _ in range(K):
    if A >= B:
        B *= 2
    elif B >= C:
        C *= 2
    else:
        C *= 2

if (B > A) and (C > B):
    print ('Yes')
else:
    print ('No')

### FIXED CODE ###

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

for _ in range(K):
    if A >= B:
        B *= 2
    elif B >= C:
        C *= 2
    else:
        C *= 2

if (B > A) and (C > B):
    print ('Yes')
else:
    print ('No')