Harryxun/stf_run huggingface dataset:
import math

def read_input():
    a, b, c, d, e, f = map(int, input().split())
    return a, b, c, d, e, f


# 100aと100bの線形結合でf以下でとりうる値を見つける
def search_water_valiation(a, b, f):
    result = []
    for i in range(30):
        for j in range(30):
            water = 100*a*i + 100*b*j
            if water <= f:
                result.append(water)

    result = list(set(result))
    result.sort()

    return result


# c, dの線形結合でmax_sugar以下の最大値を探す
# cx + dy <= max_sugarより
# y <= - c/d x + max_sugar/d
# xの範囲は(0, max_sugar/c)
def search_most_sweet(c, d, max_sugar):
    sugars = []
    for x in range(math.floor(max_sugar/c) + 1):
        y = math.floor((-c * x + max_sugar)/d)
        sugars.append(c*x + d*y)

    sugars = list(set(sugars))
    return max(sugars)

def submit():
    a, b, c, d, e, f = read_input()

    waters = search_water_valiation(a, b, f)
    max_sugars = [w * e // 100 for w in waters]

    result = []
    for water, max_sugar in zip(waters, max_sugars):
        sugar = search_most_sweet(c, d, max_sugar)
        result.append((water, sugar))

    result = [r for r in result if r[0] + r[1] <= f]
    result = [(w+s, s, 100 * s / (w + s)) for (w, s) in result if (w, s) != (0, 0)]

    r = max(result, key=lambda x:x[2])
    print('{} {}'.format(r[0], r[1]))

if __name__ == '__main__':
    submit()

### FIXED CODE ###


import math

def read_input():
    a, b, c, d, e, f = map(int, input().split())
    return a, b, c, d, e, f


# 100aと100bの線形結合でf以下でとりうる値を見つける
def search_water_valiation(a, b, f):
    result = []
    for i in range(30):
        for j in range(30):
            water = 100*a*i + 100*b*j
            if water <= f:
                result.append(water)

    result = list(set(result))
    result.sort()

    return result


# c, dの線形結合でmax_sugar以下の最大値を探す
# cx + dy <= max_sugarより
# y <= - c/d x + max_sugar/d
# xの範囲は(0, max_sugar/c)
def search_most_sweet(c, d, max_sugar):
    sugars = []
    for x in range(math.floor(max_sugar/c) + 1):
        y = math.floor((-c * x + max_sugar)/d)
        sugars.append(c*x + d*y)

    sugars = list(set(sugars))
    return max(sugars)

def submit():
    a, b, c, d, e, f = read_input()

    waters = search_water_valiation(a, b, f)
    max_sugars = [min(w * e // 100, f - w) for w in waters]

    result = []
    for water, max_sugar in zip(waters, max_sugars):
        sugar = search_most_sweet(c, d, max_sugar)
        result.append((water, sugar))

    result = [r for r in result if r[0] + r[1] <= f]
    result = [(w+s, s, 100 * s / (w + s)) for (w, s) in result if (w, s) != (0, 0)]

    r = max(result, key=lambda x:x[2])
    print('{} {}'.format(r[0], r[1]))

if __name__ == '__main__':
    submit()
h,w,m=map(int,input().split())
g=[]
e1=[0]*h
e2=[0]*w
for c in range(m):
    a,b=map(int,input().split())
    g.append([a-1,b-1])
    e1[a-1]+=1
    e2[b-1]+=1
p1=max(e1)
p2=max(e2)
x=[c for c in range(h) if e1[c]==p1]
y=[c for c in range(w) if e2[c]==p2]
if len(x)*len(y)>m:
    print(p1+p2)
    exit()
for i in x:
    for j in y:
        if [i,j] not in g:
            print(p1+p2)
            exit()
print(p+q-1)

### FIXED CODE ###

h,w,m=map(int,input().split())
g=[]
e1=[0]*h
e2=[0]*w
for c in range(m):
    a,b=map(int,input().split())
    g.append([a-1,b-1])
    e1[a-1]+=1
    e2[b-1]+=1
p1=max(e1)
p2=max(e2)
x=[1 if e1[c]==p1 else 0 for c in range(h)]
y=[1 if e2[c]==p2 else 0 for c in range(w)]
r=sum(x)*sum(y)
for i in g:
    if x[i[0]]==1 and y[i[1]]==1:
        r-=1
if r==0:
    print(p1+p2-1)
else:
    print(p1+p2)
N = int(input())
A = int(input())
B = int(input())

def kansuu(N,A,B):
	if N*A>B:
	  return B
	else:
 	  return NA

### FIXED CODE ###

import numpy as np
N,A,B=map(int,input().split())
if N*A > B:
  print(B)
else:
  print(N*A)
s = map(int(input().split()))
n = 0
i = 0
cout = 0
for i in s:
  if s[i] % 2 == 0:
    cout += 1
  else:
    cout += 0
print(cout)

### FIXED CODE ###

N = int(input())
a = list(map(int, input().split()))
 
i = 0
odd = 0
while odd == 0:
    for n in range(N):
        if a[n] % 2 == 0:
            a[n] /= 2
        else:
            odd = 1
            break
    if odd == 0:
        i += 1
print(i)
import sys

stdin = sys.stdin.readline
na = lambda: map(int, stdin().split())
ns = lambda: stdin().rstrip()
ni = lambda: int(ns())
def main():
  n, k = na()
  s = ns()+"0"

  ans = 0
  LRcnt = []
  cnt = 1
  LR = []
  for i in range(n):
    if s[i] == s[i+1]:
      ans += 1
      cnt += 1
    else:
      LR.append(s[i])
      LRcnt.append(cnt)
      cnt = 1

  N = len(LRcnt)
  wa = [0] * (N+1)
  for i in range(N):
    wa[i+1] = wa[i] + LRcnt[i]

  ans = 0
  for i in range(N-k-2):
    x = wa[i+k+2] - wa[i] - 1 + sum(LRcnt[i+k+2:]) - len(LRcnt[i+k+2:]) + sum(LRcnt[:i+k+2]) - len(LRcnt[:i+k+2])
    if ans < x:
      ans = x
      if LR[i] == "R":
        ans -= 1
      if LR[i+k+1] == "L"::
        ans += 1

  if ans == 0:
    print(sum(LRcnt)-1)
  else:
    print(ans)
main()

### FIXED CODE ###

import sys

stdin = sys.stdin.readline
na = lambda: map(int, stdin().split())
ns = lambda: stdin().rstrip()
ni = lambda: int(ns())

def main():
  n, k = na()
  s = ns()

  ans = n-1
  for i in range(1, n):
    if s[i] != s[i-1]:
      ans -= 1
  print(min(n-1, ans+2*k))
main()
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))

from collections import deque

n, k = getList()

vertex = [[] for i in range(n)]

for i in range(n-1):
    a, b = getList()
    vertex[a-1].append(b-1)
    vertex[b-1].append(a-1)

for i, v in enumerate(vertex):
    if len(v) == 1:
        root = i
        break

MOD = 1000000007

# initialize
q = deque([])
q.append(vertex[root][0])
q.append(-1)
visited = [0 for i in range(n)]
visited[root] = 1
ans = k
uni = 1
while(q):
    # print(q)
    nxt = q.popleft()

    if nxt == -1:
        uni = 2
        continue
    if visited[nxt] == 1:
        continue
    for edge in vertex[nxt]:
        if visited[edge] == 0:
            q.append(edge)
    q.append(-1)
    ans *= k - uni
    ans = ans % MOD
    uni += 1
    visited[nxt] = 1
    # print(nxt, ans)

print(ans)


### FIXED CODE ###

def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))

from collections import deque
from sys import exit

MOD = 1000000007

n, k = getList()
if n == 1:
    print(k % MOD)
    exit()
vertex = [[] for i in range(n)]

for i in range(n-1):
    a, b = getList()
    vertex[a-1].append(b-1)
    vertex[b-1].append(a-1)

for i, v in enumerate(vertex):
    if len(v) == 1:
        root = i
        break

MOD = 1000000007

# initialize
q = deque([])
q.append(vertex[root][0])
q.append(-1)
visited = [0 for i in range(n)]
visited[root] = 1
ans = k
uni = 1
while(q):
    # print(q)
    nxt = q.popleft()

    if nxt == -1:
        uni = 2
        continue
    if visited[nxt] == 1:
        continue
    for edge in vertex[nxt]:
        if visited[edge] == 0:
            q.append(edge)
    q.append(-1)
    ans *= k - uni
    ans = ans % MOD
    uni += 1
    visited[nxt] = 1
    # print(nxt, ans)

print(ans)
N, K= map(int,input().split())
A = list(map(int,input().split()))
p=0
while p<K:
  B=[0]*N
  for i in range(N):
    count = 0
    for j in range(N):
      if A[j]+1>abs(j-i):
        count +=1
    B[i] = count
  if min(A)==N:
    break
  A = B
  p +=1
print(*A)

### FIXED CODE ###

A, V=map(int,input().split())
B, W=map(int,input().split())
T =int(input())
D = abs(A-B)

if (V-W)*T>=D:
  print("YES")
#elif 10**9-A<=V*T and A<B:
#  print("YES")
#elif abs(-10**9-A)<=V*T and A>B:
#  print("YES")
else:
  print("NO")
import fileinput

if __name__ == "__main__":
    val = fileinput.input()
    ans = val ** 3
    print(ans)

### FIXED CODE ###

#if __name__ == "__main__":
#    val = input()
#    ans = val**3
#    print(ans)

#!/usr/bin/env python
# -*- coding: utf-8 -*-


if __name__ == '__main__':
    n = int(input())
    print(n**3)
def popcount(x):
    x = x - ((x >> 1) & 0x5555555555555555)
    x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)
    x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f
    x = x + (x >> 8)
    x = x + (x >> 16)
    x = x + (x >> 32)
    return x & 0x0000007f

N,X = open(0).read().split()
N = int(N)
X = int(X,2)

for i in range(0, N):
    x = X
    x = x ^ (1 << (N - 1 - i))
    ans = 0
    while x != 0:
        x = x % popcount(x)
        ans += 1
    print(ans)

### FIXED CODE ###

def popcount(x):
    return bin(x).count("1")

N, X = open(0).read().split()
N = int(N)
XS = list(X)
X = int(X, 2)

p = popcount(X)
xi = X % (p + 1)
if p == 1:
    xd = 0
else:
    xd = X % (p - 1)

for i in range(N):
    if XS[i] == "1":
        if p == 1:
            print(0)
            continue
        else:
            k = pow(2, N - 1 - i, p - 1)
            x = (xd - k) % (p - 1)
    else:
        k = pow(2, N - 1 - i, p + 1)
        x = (xi + k) % (p + 1)
    ans = 1
    while x != 0:
        x %= popcount(x)
        ans += 1
    print(ans)
S = input().strip()
K = int(input().strip())

i = 0
while S[i] == '1':
    i += 1

print(S[i] if K > i else 1)

### FIXED CODE ###

S = input().strip()
K = int(input().strip())

i = 0
while S[i] == '1' and i < len(S) - 1:
    i += 1

print(S[i] if K > i else 1)
# -*- coding: utf-8 -*-
def shiritori(a, b):
    return a[len(a)-1:] == b[:1]


a, b, c = map(input().split())
if shiritori(a, b) is True and shiritori(b, c) is True:
    print("YES")
else:
    print("NO")


### FIXED CODE ###

# -*- coding: utf-8 -*-
def shiritori(a, b):
    return a[len(a)-1:] == b[:1]


a, b, c = input().split()
if shiritori(a, b) is True and shiritori(b, c) is True:
    print("YES")
else:
    print("NO")
from collections import defaultdict, deque

n, m = [int(i) for i in input().split()]

# children = defaultdict(list)
parents = defaultdict(list)

for _ in range(m):
    u, v = [int(i) for i in input().split()]
    # children[u-1].append(v-1)
    parents[v-1].append(u-1)

def longest_path(children, parents, n):
    f = [None] * n
    targets = [x for y in children.values() for x in y]
    starts = [v for v in range(n) if v not in targets]

    # print f
    for i in range(n):
        get_f(children, parents, f, i)

    # print f
    return max(f)

def get_f(children, parents, f, i):
    if f[i] != None:
        return f[i]

    f[i] = 0
    for v in parents[i]:
        f[i] = max(f[i], get_f(children, parents, f, v) + 1)

    return f[i]

# def longest_path(children, parents, n):
#     targets = [x for y in children.values() for x in y]
#     starts = [v for v in range(n) if v not in targets]
#     f = [None] * n
    
#     Q = deque([])
#     for v in starts:
#         f[v] = 0
#         Q.append((v, 0))

#     output = 0
#     while len(Q) > 0:
#         node, length = Q.pop()
#         output = max(output, length)
#         for v in children[node]:
#             Q.append((v, length+1))

#     return output

print(longest_path(children, parents, n))


### FIXED CODE ###

from collections import defaultdict
import sys
sys.setrecursionlimit(1000000)

n, m = [int(i) for i in raw_input().split()]
parents = defaultdict(list)

i = 0
while i < m:
    u, v = [int(x) for x in raw_input().split()]
    parents[v-1].append(u-1)
    i += 1

def calc_f(parents, f, i):
    if i < 0 or i >= len(f):
        return 0

    if f[i] != -1:
        return f[i]

    f[i] = 0
    for v in parents[i]:
        f[i] = max(f[i], calc_f(parents, f, v)+1)

    return f[i]

f = [-1] * n
j = 0
while j < n:
    calc_f(parents, f, j)
    j += 1

if len(f) == 0:
    print 0
else:
    print max(f)
S = input()
K = int(input())

i = 0
while S[i] == '1':
    i += 1
if K < i:
    print(1)
else:
    print(S[i])


### FIXED CODE ###

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

i = 0
while i < len(S) and S[i] == '1':
    i += 1
if K <= i or i == len(S):
    print(1)
else:
    print(S[i])
x = int(input())
a = 0
for i in range(1,x+1):
    for j in range(2,4):
        if i**j <= x:
            a = max(a,i**j)
print(a)

### FIXED CODE ###

a,b,c,d=map(int,input().split())
x = abs(a-b)
y = abs(b-c)
z = abs(a-c)
if x <= d and y <= d:
    print("Yes")
elif z <= d:
    print("Yes")
else:
    print("No")
A,B = map(int,input().split())

if (A=1 and B!=1):
    print("Alice")
    
   




if (A>B):
    print("Alice")
elif(A<B):
    print("Bob")
elif(A==B):
    print("Draw")
     


### FIXED CODE ###

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

if (A==1 and B!=1):
    print("Alice")
    exit()
elif(B==1 and A!=1):
    print("Bob")   
    exit()




if (A>B):
    print("Alice")
elif(A<B):
    print("Bob")
elif(A==B):
    print("Draw")
if a*b < ((c-a-b)/2)**2:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

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

if a == 0 and b == 0:
    if c > 0:
        print('Yes')
    else:
        print('No')
elif c-a-b <= 0:
    print('No')
else:
    if 4*a*b < (c-a-b)**2:
        print('Yes')
    else:
        print('No')
s= input().strip()
t= input().strip()

ls=len(s)
lt=len(t)
v=''
for i in range(ls):
    v+=s[i]+t[i]
if lt!=ls:
    v+=t[-1]
print(v)

### FIXED CODE ###

s= input().strip()
t= input().strip()

ls=len(s)
lt=len(t)
v=''
for i in range(lt):
    v+=s[i]+t[i]
if lt!=ls:
    v+=s[-1]
print(v)
import math

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

a = [-1] * (M+2)

for i in range(1,M+1) :
    a[i] = int(input())

flag = True # 可能かどうか
for i in range(0,M+1) :
    if a[i] + 1 == a[i+1] :
        flag = False
        break

if flag :
    a[M+1] = N + 1

    ans = 1

    for i in range(M+1) :
        length = a[i+1] - a[i] - 2 # 上がる長さ
        max2step = math.floor(length / 2) # 2段の回数
        count = 1
        for j in range(1,max2step+1) :
            if length - 2 * j < 0 :
                break
            step2 = math.factorial(j)
            step1 = math.factorial(int(length-2*j))
            count += math.factorial(length - j) / step1 / step2
        ans *= count

    print(int(ans % 1000000007))
else :
    print(0)

### FIXED CODE ###

import math

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

if M == 0:
    a = [-1 , N+1]
else :
    a = [-1] * (M+2)

    for i in range(1,M+1) :
        a[i] = int(input())


flag = True # 可能かどうか
for i in range(0,M+1) :
    if a[i] + 1 == a[i+1] :
        flag = False
        break

fib = [1] * (N+1) # フィボナッチ数列
for i in range(2,N+1) :
    fib[i] = fib[i-1] + fib[i-2]

if flag :
    a[M+1] = N + 1

    ans = 1

    for i in range(M+1) :
        length = a[i+1] - a[i] - 2 # 上がる長さ
        ans *= fib[length]

    print(ans % 1000000007)
else :
    print(0)
# -*- coding: utf-8 -*-

n, m = map(int, input().split())
l = sorted(list(map(int, input().split())))
divcount = n - 1

l1 = l[1:]
l2 = l[:m - 1]
divl = []

for i in range(m - 1):
    divl.append(l1[i] - l2[i])

divl.sort(reverse = True)

if n == 1:
    print(max(l) - min(l))
else:
    for i in range(divcount):
        del divl[0]
    
    print (sum(divl))

### FIXED CODE ###

# -*- coding: utf-8 -*-
 
n, m = map(int, input().split())
l = sorted(list(map(int, input().split())))
divcount = n - 1
 
l1 = l[1:]
l2 = l[:m - 1]
divl = []
 
for i in range(m - 1):
    divl.append(l1[i] - l2[i])
 
divl.sort(reverse = True)
 
if n == 1:
    print(max(l) - min(l))
else:
    if m > n:
        for i in range(divcount):
            del divl[0]
    
        print (sum(divl))
    
    else:
        print(0)
n = list(map(int,input().split()))

a = n[0]
aa = a*a
b = n[1]
bb = b*b
c = n[2]
cc = c*c

if aa+bb < cc :

	print("Yes")
  
else :

	print("No")

### FIXED CODE ###

number = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
 
print(number[int(input())-1])
#"""
import sys
input = sys.stdin.readline
#"""

N=int(input())
A = [list(map(int,input().split())) for _ in [0]*N]

V = {(i,j):0 for i in range(N) for j in range(i+1,N)}
Ef = {(i,j):[] for i in range(N) for j in range(i+1,N)}
for i,B in enumerate(A):
    k1 = (0,B[0]-1)
    for j in range(N-2):
        a1 = B[j+1]-1
        k0 = k1
        k1 = (i,a1) if i<a1 else (a1,i)
        Ef[k0].append(k1)
        V[k1] += 1

q = [k for k in V if V[k] == 0]
ans = 0
rmv = 0
while q:
    qq = []
    for k in q:
        for k2 in Ef[k]:
            V[k2] -= 1
            rmv += 1
            if V[k2] == 0 : qq.append(k2)
    ans += 1
    q = qq
if rmv != N*(N-2) : ans = -1
print(ans)

### FIXED CODE ###

#"""
import sys
input = sys.stdin.readline
#"""
def main():
    def get_key(i,j):
        if i<j: i,j = j,i
        return i*N+j
    N=int(input())
    A = [list(map(int,input().split())) for _ in [0]*N]
    V = [-1]*(N*N)
    for i in range(N):
        for j in range(i+1,N):
            V[get_key(i,j)] = 0
    Ef = [[] for _ in V]

    for i,B in enumerate(A):
        a0 = B[0]-1
        k1 = (i,a0)
        for a1 in B[1:]:
            a1 -= 1
            k0 = k1
            k1 = (i,a1)
            Ef[get_key(*k0)].append(get_key(*k1))
            V[get_key(*k1)] += 1

    q = [i for i,v in enumerate(V) if v == 0]
    ans = 0
    rmv = 0
    while q:
        qq = []
        for i in q:
            for j in Ef[i]:
                V[j] -= 1
                rmv += 1
                if V[j] == 0 : qq.append(j)
        ans += 1
        q = qq
    if rmv != N*(N-2) : ans = -1
    print(ans)
main()
from collections import defaultdict
INF = float('inf')
H,W,D = map(int,input().split())
A = [list(map(int,input().split())) for _ in range(H)]

d = defaultdict(lambda:[])

for i in range(H):
    for j in range(W):
        d[A[i][j]] = [i,j]

cost = defaultdict(lambda:[])
for r in range(1,D+1):
    for m in range(0,H*W//D):
        if D*(m+1)+r <= H*W:
            cost[r].append(abs(d[D*m+r][0]-d[D*(m+1)+r][0])+abs(d[D*m+r][1]-d[D*(m+1)+r][1]))
for r in range(1,D+1):
    for m in range(len(cost[r])-1):
        cost[r][m+1] += cost[r][m]

Q = int(input())

def magic(L,R):
    r = L%D
    if r == 0:
        r = D
    ml = (L-r)//D
    mr = (R-r)//D
    res = cost[r][mr-1]
    if ml != 0:
        res -= cost[r][ml-1]
    return res


for _ in range(Q):
    L,R = map(int,input().split())
    print(magic(L,R))

### FIXED CODE ###

H,W,D = map(int,input().split())
d = {}
for i in range(H):
    A = list(map(int,input().split()))
    for j in range(W):
        d[A[j]] = (i,j)
m = []
for i in range(1,D+1):
    mm = [0]
    for j in range(i+D,H*W+1,D):
        k = (j-i)//D
        dd = mm[k-1]+abs(d[j][0]-d[j-D][0])+abs(d[j][1]-d[j-D][1])
        mm.append(dd)
    m.append(mm)
Q = int(input())
for i in range(Q):
    L,R = map(int,input().split())
    if L%D != 0:
        mm = m[L%D-1]
        Lq = L//D
        Rq = R//D
        print(mm[Rq]-mm[Lq])
    else:
        mm = m[D-1]
        Lq = L//D
        Rq = R//D
        print(mm[Rq-1]-mm[Lq-1])
N, K = map(int, input().strip().split())
ab = []
for _ in range(N):
  ab.append(tuple(map(int, input().strip())))

kc = 0
for a, b in sorted(ab, key=lambda x: x[0]):
  if kc + b >= K:
    break
  kc += b

print(a)


### FIXED CODE ###

N, K = map(int, input().strip().split())
ab = []
for _ in range(N):
  ab.append(tuple(map(int, input().strip().split())))

kc = 0
for a, b in sorted(ab, key=lambda x: x[0]):
  if kc + b >= K:
    break
  kc += b

print(a)
N=int(input())
for i range(1,10):
    if N%i==0 and N//i<=9:
        print('Yes')
else:print('No')


### FIXED CODE ###

N=int(input())
for i in range(1,10):
    if N%i==0 and N//i<=9:
        print('Yes')
        break
else:print('No')
import sys
sys.setrecursionlimit(2000000)

def comb(n,k):
    if n==k or k==0:
        return 1
    elif lis[n][k]>0:
        return lis[n][k]
    else:
        lis[n][k]=comb(n-1,k)+comb(n-1,k-1)%1000000007
        return lis[n][k]
    
    

def divide(k,i):
    return comb(k-1,i-1)
n,k = map(int,input().split())
lis = [[0]*i for i in range(1,n+1)]

for i in range(1,k+1):
    print(divide(k,i)*comb(n-k+1,i)%1000000007)

### FIXED CODE ###

import sys
sys.setrecursionlimit(2000000)

def comb(n,k):
    if n==k or k==0:
        return 1
    elif lis[n][k]>0:
        return lis[n][k]
    else:
        lis[n][k]=comb(n-1,k)+comb(n-1,k-1)%1000000007
        return lis[n][k]
    
    

def divide(k,i):
    return comb(k-1,i-1)
n,k = map(int,input().split())
lis = [[0]*i for i in range(1,n+1)]

for i in range(1,k+1):
    if i-1 <= n-k:
        print(divide(k,i)*comb(n-k+1,i)%1000000007)
    else:
        print(0)
from sympy import sieve

x = int(input())
boolean = True
while boolean:
    if x in sieve:
        print(x)
        break
    x += 1 

### FIXED CODE ###

import math

#引数nが素数かどうかを判定
def is_prime(n):
    for i in range(2, int(math.sqrt(n))+1):
        if n%i == 0:
            return False
    return True

x = int(input())
boolean = True
while boolean:
    if is_prime(x):
        print(x)
        break
    x += 1
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 29 14:42:43 2018

@author: maezawa
"""

def print_array(g):
    ans = str(g[0])
    if len(g) > 1:
        for i in range(1,len(g)):
            ans += ' '+str(g[i]) 
    print(ans)

name=[]
time=[]
current_time = 0

n, q = list(map(int, input().split()))
for i in range(n):
    s = input().split()
    name.append(s[0])
    time.append(int(s[1]))
# =============================================================================
# print(n,q)
# print(name)
# print(time)
# =============================================================================
finished = []
fin_time = []
i=0
remain = n
while True:
    if time[i] <= q:
        current_time += time.pop(i)
        finished.append(name.pop(i))
        fin_time.append(current_time)      
        remain -= 1
        if remain == 0:
            break
        #i = (i+1)%remain
    else:
        time[i] -= q
        current_time += q
        i = (i+1)%remain

for i in range(n):
    print("{} {}".format(finished[i], fin_time[i]))
        
    


### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Sun Apr 29 18:04:22 2018
ALDS1_3b_r リングバッファによる実装
@author: maezawa
"""

def fifo_enque(data):
    global tail
    global fifo
    fifo[tail] = data
    tail = (tail+1)%fifo_size
    
def fifo_deque():
    global head
    global fifo
    data = fifo[head]
    head = (head+1)%fifo_size
    return data

fifo_size = 100000
fifo = [0 for _ in range(fifo_size)]
head = 0
tail = 0

n, q = list(map(int, input().split()))
for i in range(n):
    s = input().split()
    data = [s[0], int(s[1])]
    fifo_enque(data)
    
current_time = 0
finished = []
fin_time = []

while True:
    data = fifo_deque()
    if data[1] > q:
        current_time += q
        data[1] -= q
        fifo_enque(data)
    else:
        current_time += data[1]
        finished.append(data[0])
        fin_time.append(current_time)
    if head == tail:
        break

for i in range(n):
    print("{} {}".format(finished[i], fin_time[i]))
import functools
import math
N = int(input())
a = list(map(int, input().split()))

gcd = []
for i in range(N):
    list_not_i = a.copy()
    list_not_i.remove(a[i])
    gcd.append(functools.reduce(math.gcd, list_not_i))

print(max(gcd))

### FIXED CODE ###

import functools
import fractions
N = int(input())
a = list(map(int, input().split()))

L = [0] * N
for i in range(N) :
        if i == 0 :
                L[0] = 0
        elif i == 1 :
                L[1] = a[0]
        else :
                L[i] = fractions.gcd(L[i-1], a[i-1])

a.reverse()
R = [0] * N
for i in range(N) :
        if i == 0 :
                R[0] = 0
        elif i == 1 :
                R[1] = a[0]
        else :
                R[i] = fractions.gcd(R[i-1], a[i-1])
R.reverse()
a.reverse()

gcd = [0] * N
for i in range(N) :
        if i == 0 :
                gcd[0] = R[0]
        elif i == N-1 :
                gcd[N-1] = L[N-1]
        else :
                gcd[i] = fractions.gcd(L[i],R[i])

print(max(gcd))
import math

def main():
    a, b, c = map(int, input().split())
    
    top = max([a, b, c])
    bot = min([a, b, c])
    mid = 0
    for x in [a, b, c]:
        if top != x and bot != x:
            mid = x
    count = 0
    
    count = top - mid
    bot += count
    mid += count
    
    if (top - bot) % 2 == 0:
        count += (top - bot) / 2 
    else:
        count += math.ceil((top - bot) / 2)+1
        
    print(int(count), end="")
    print()

if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    a = input()
    if 'a' in a and 'b' in a and 'c' in a:
        print("Yes", end="")
    else:
        print("No", end="")

if __name__ == "__main__":
    main()