Harryxun/stf_run huggingface dataset:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
S = list(input())
ls =[]
count = 0
for i in range(len(S)):
    
    if S[i] in 'ATGC':
        count += 1
    else:
        ls.append(count)
        count = 0

print(max(ls))



### FIXED CODE ###

#! /usr/bin/env python3
# -*- coding: utf-8 -*-
S = list(input())
clst=[]
count = 0
for s in S:
    if s == 'A' or s == 'T' or s =='C' or s == 'G':
        count += 1
        clst.append(count)
    else:
        
        count = 0
        clst.append(count)
print(max(clst))
x=int(input())
y=int(input())
if x==1 and y==1:
  print(1000000)
elif x==1 and y==2 or x==2 and y==1:
  print(500000)
elif x==1 and y==3 or x==3 and y==1 or x==2 and y==2:
  print(400000)
elif x==3 and y==3:
  print(200000)
elif x==1 and y>=4 or x>=4 and y==1:
  print(300000)
elif x==2 and y>=4 or x>=4 and y==2:
  print(200000)
elif x==3 and y>=4 or x>=4 and y==3:
  print(100000)
else:
  pass

### FIXED CODE ###

x,y=map(int,input().split())
if x==1 and y==1:
  print(1000000)
elif x<=3 and y>=4:
  print((x-4)*(-100000))
elif x>=4 and y<=3:
  print((y-4)*(-100000))
elif x<=3 and y<=3:
  print((x-4)*(-100000)+(y-4)*(-100000))
else:
  print(0)
import collections
import sys
input = sys.stdin.readline
n = int(input())
b = []
for i in range(n):
  a = int(input())
  b_append = b.append
  b_append(a)

s = set(b)
c = collections.Counter(b)
ans = 0
for i in range(n-len(s)):
  if c.most_common()[i][1] % 2 == 0:
    ans -= 1
ans += len(s)
print(ans)

### FIXED CODE ###

n = int(input())
a = []
for i in range(n):
  a.append(int(input()))
a.sort()
b = []
for i in range(0,n-1,2):
  if a[i] != a[i+1]:
    b.append(a[i])
    b.append(a[i+1])
  else:
    continue
if n%2 == 1:
  b.append(a[-1])
#print(b)
ans = []
if b != []:
  ans.append(b[0])
  for j in range(1,len(b)-1,2):
    if b[j] != b[j+1]:
      ans.append(b[j])
      ans.append(b[j+1])
  if len(b)%2 == 0:
    ans.append(b[-1])
#print(ans)
if ans == []:
  print(0)
else:
  print(len(ans))
n,k=map(int,input().split())
a = list(map(int,input().split()))
rep = []
rep.append(1)
onf = 0
def repeat(i,rep):
    if a[i] not in rep:
        rep.append(a[i])
        repeat(a[i]-1,rep)
    else:
        rep.append(a[i])
        return 1
onf=repeat(0,rep)
if onf==0:
    print(rep)
else:
    lr = len(rep)
    for i in range(lr):
        if rep[i]==rep[lr-1]:
            start=i
            rep2 = rep[i:lr-1]
            break
    mod = len(rep2)
    modL = [i%mod for i in range(start,start+mod)]
    resM = k%mod
    for i in range(mod):
        if resM == modL[i]:
            print(rep2[i])

### FIXED CODE ###

n,k=map(int,input().split())
a = list(map(int,input().split()))
visit = []
visit = [0]*n
pos=0
move=[]
roop=[]
while visit[pos]!=2:
    if visit[pos]==0:
        move.append(pos)
    else:
        roop.append(pos)
    visit[pos]+=1
    pos = a[pos]-1
if len(move)>k:
    print(move[k]+1)
else:
    mod = (k-(len(move)-len(roop)))%len(roop)
    print(roop[mod]+1)
from itertools import combinations


def main():
    N = int(input())
    x = []
    y = []
    for _ in range(N):
        x_n, y_n = map(int, input().split())
        x.append(x_n)
        y.append(y_n)
    comb = list(combinations([i for i in range(N)], 2))
    dic = {}
    for c in comb:
        i, j = c[0], c[1]
        dx = x[j] - x[i]
        dy = y[j] - y[i]
        if not (dx, dy) in dic.keys():
            dic[(dx, dy)] = 0
        if not (-dx, -dy) in dic.keys():
            dic[(-dx, -dy)] = 0
        dic[(dx, dy)] += 1
        dic[(-dx, -dy)] += 1
    dic_sorted = sorted(dic.items(), key=lambda x:x[1])[::-1]
    print(N - dic_sorted[0][1])
    return


if __name__ == '__main__':
    main()


### FIXED CODE ###

from itertools import combinations


def main():
    N = int(input())
    x = []
    y = []
    for _ in range(N):
        x_n, y_n = map(int, input().split())
        x.append(x_n)
        y.append(y_n)
    if N == 1:
        print(1)
        return
    comb = list(combinations([i for i in range(N)], 2))
    dic = {}
    for c in comb:
        i, j = c[0], c[1]
        dx = x[j] - x[i]
        dy = y[j] - y[i]
        if not (dx, dy) in dic.keys():
            dic[(dx, dy)] = 0
        if not (-dx, -dy) in dic.keys():
            dic[(-dx, -dy)] = 0
        dic[(dx, dy)] += 1
        dic[(-dx, -dy)] += 1
    dic_sorted = sorted(dic.items(), key=lambda x:x[1])[::-1]
    print(N - dic_sorted[0][1])
    return


if __name__ == '__main__':
    main()
while True:
    m, n = (int(s) for s in raw_input().split())
    if not m:
        break

    objs = [int(raw_input(), 2) for i in range(n)]
    dp = [[0] * (1<<m) for i in range(1 << m)]
    bits = [1 << i for i in range(m)]

    for mask in reversed(range(1 << m)):
        s = Counter(obj & mask for obj in objs)
        for mask0, value in s.items():
            if value > 1:
                dp[mask][mask0] = min(max(dp[mask | b][mask0],
                                          dp[mask | b][mask0 | b]) + 1
                                      for b in bits if not b & mask)
    print dp[0][0]

### FIXED CODE ###

from collections import Counter

while True:
    m, n = (int(s) for s in input().split())
    if not m:
        break

    objects = [int(input(), 2) for i in range(n)]
    dp = [bytearray(1 << m) for i in range(1 << m)]
    bits = [1 << i for i in range(m)]

    for asked in reversed(range((1 << m) - 1)):
        for masked, count in Counter(obj & asked for obj in objects).items():
            if count > 1:
                dp[asked][masked] = min(max(dp[asked + b][masked],
                                            dp[asked + b][masked + b])
                                        for b in bits if not b & asked) + 1
    print(dp[0][0])
import math
import heapq
import sys
import re
from collections import Counter
import datetime
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN

#N,K=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
#x=list(map(int, input().split()))  #リスト入力 「a1 a2 a3 ...」みたいな配列のような入力のとき

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

N=int(input())

print(lcm(2,N))
    

### FIXED CODE ###

import math
import fractions
import heapq
import sys
import re
from collections import Counter
import datetime
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN

#N,K=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
#x=list(map(int, input().split()))  #リスト入力 「a1 a2 a3 ...」みたいな配列のような入力のとき

N=int(input())
print((2*N)//fractions.gcd(2,N))
import math
n, m = input().split()
m = int(m)
n = int(n)
if n == 1 or n == 0:
	nNum = 0
else:
	nNum = math.factorial(n) / (math.factorial(n-2) * math.factorial(2))
if m == 1 or n == 0:
	mNum = 0
else:
	mNum = math.factorial(m) / (math.factorial(m-2) * math.factorial(2))
print(int(mNum + nNum))

### FIXED CODE ###

import math
n, m = input().split()
m = int(m)
n = int(n)
if n == 1 or n == 0:
	nNum = 0
else:
	nNum = math.factorial(n) / (math.factorial(n-2) * math.factorial(2))
if m == 1 or m == 0:
	mNum = 0
else:
	mNum = math.factorial(m) / (math.factorial(m-2) * math.factorial(2))
print(int(mNum + nNum))
# AOJ ITP1_10_C

import math

def intinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    while True:
        n = int(input())
        if n == 0: break
        data = intinput()
        sum_1 = 0  # 1乗の総和
        sum_2 = 0  # 2乗の総和
        for i in range(n):
            sum_1 += data[i]; sum_2 += data[i] ** 2
        sigma = math.sqrt((sum_2 - (sum_1 ** 2)) / n)
        print(sigma)

if __name__ == "__main__":
    main()


### FIXED CODE ###

# AOJ ITP1_10_C

import math

def intinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    while True:
        n = int(input())
        if n == 0: break
        data = intinput()
        sum_1 = 0  # 1乗の総和
        sum_2 = 0  # 2乗の総和
        for i in range(n):
            sum_1 += data[i]; sum_2 += data[i] ** 2
        # print('(%d, %d)' % (sum_1, sum_2))
        sigma = math.sqrt((sum_2 / n) - ((sum_1 / n) ** 2))
        print(sigma)

if __name__ == "__main__":
    main()
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    x = f()[0]
    if x >= 1200:
        print("ARC")
    else print("ABC")

solve()


### FIXED CODE ###

import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    x = f()[0]
    if x >= 1200:
        print("ARC")
    else:
        print("ABC")

solve()
N = list(map(int, input()))
ans = 'N'
if N[0] == N[1] and N[0] == N[2]:
    ans = 'Y'¥
elif N[1] == N[2] and N[1] == N[3]:
    ans = 'Y'

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

### FIXED CODE ###

N = list(map(int, input()))
ans = 'N'
if N[0] == N[1] and N[0] == N[2]:
    ans = 'Y'
elif N[1] == N[2] and N[1] == N[3]:
    ans = 'Y'

if ans == 'Y':
    print('Yes')
else:
    print('No')
import sys
input = sys.stdin.readline
def main():
    n,m = map(int,input().split())
    edge = [[] for _ in [0]*n]
    for _ in range(m):
        a,b = map(int,input().split())
        edge[a-1].append(b-1)


    new = [0]*n
    for i in range(n):
        new[i] = i
    res = []
    tank = []
    res2 = -1

    while len(new) > 0:
        tank = []
        for i in range(len(new)):
            el = new[i]

            for go in edge[el[-1]]:
                if not go in el:
                    if el[0] in edge[go]:
                        print(len(el)+1)
                        for e in el:
                            print(e+1)
                        print(go+1)

                        exit()
                    tank.append(el+[go])
        new = tank
        
    print(-1)

if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
input = sys.stdin.readline

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

edge = [[] for _ in [0]*n]
back = [[] for _ in [0]*n]

for _ in [0]*m:
    a,b = map(int,input().split())
    edge[a-1].append(b-1)
    back[b-1].append(a-1)


res = [None]*(n+1)

for end in range(n):
    for start in edge[end]:
        cost = [-1]*n
        cost[start] = 0
        new = [start]
        tank = []
        judge = True

        while len(new) > 0 and judge:
            tank = []
            for fr in new:
                for go in edge[fr]:
                    if cost[go] < 0:
                        cost[go] = cost[fr] + 1
                        tank.append(go)
                        if go == end:
                            judge = False
            new = tank

        
        if cost[end] >= 0 and cost[end] < len(res):
            p = end
            res = [p+1]
            while p != start:
                for e in back[p]:
                    if cost[p] == cost[e]+1:
                        p = e
                        res.append(p+1)
                        break
if res[0] == None:
    print(-1)
else:                      
    print(len(res))
    for e in res:
        print(e)
d=input().split()
n={0:(1,2,4,3,1),1:(0,3,5,2,0),2:(0,1,5,4,0),3:(1,0,4,5,1),4:(0,2,5,3,0),5:(1,3,4,2,1)}
for _ in range(int(input())):
 t,f=[d.index(s) for s in input().split()]
 n=n[int(t)]
 print(d[n[n.index(int(f))+1]])


### FIXED CODE ###

d=input().split()
for _ in range(int(input())):
 t,f=[d.index(s)for s in input().split()]
 n=[(1,2,4,3,1),(0,3,5,2,0),(0,1,5,4,0),(1,0,4,5,1),(0,2,5,3,0),(1,3,4,2,1)][t]
 print(d[n[n.index(f)+1]])
import sys
from  decimal import *
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

a, b, c = map(int, read().split())
if pow(Decimal(a), .5) + pow(Decimal(b, .5) < pow(Decimal(c, .5)):


        print("Yes")
    else:
        print("No")


### FIXED CODE ###

import sys
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

a, b, c = map(int, read().split())
if ((c - a - b) > 0) & (4 * a * b < pow(c - a - b, 2)):
    print("Yes")
else:
    print("No")
def main():
    S  = input()
    K  = int(input())

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


if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    S  = input()
    K  = int(input())

    cnt = 0
    while cnt<len(S) and  S[cnt]=='1':
        cnt = cnt + 1
    
    if K<=cnt:
        print(S[0])
    elif cnt==len(S):
        print(S[cnt-1])
    else:
        print(S[cnt])


if __name__ == '__main__':
    main()
N,M=map(int,input().split())
A = [int(x) for x in input().split()]
B = []
length = len(A)
for i in range(M):
  b,c = map(int,input().split())
  B.extend(b*[c])
A.sort(reverse = True)
B.sort(reverse=True)
A = A[:length] + B[:length]
if A[-1] >= B[0]:
  print(sum(A))
elif B[-1] > = A[0]:
  print(sum(B)
else:
  C = A + B
  C.sort(reverse=True)
  print(C[:length])

### FIXED CODE ###

read = input 
rn = lambda :map(int, read().split())
n,m = rn()
A = list(rn())
l = len(A)
d = {}
for x in A:
    if x not in d:
        d[x]=0
    d[x] += 1
for i in range(m):
    b, c = rn()
    if c not in d:
        d[c]=0
    d[c] += b
A = list(d.items())
A.sort(reverse=True)
ans = 0
cnt = l
# print(A)
for v, c in A:
    tmp = min(cnt, c)
    ans += tmp * v
    cnt -= tmp
print(ans)
a = 0
b = 0

a = input()
b = input()

c = a*b
if c%2 == 0:
    print("Even")
else:
    print("Odd")

### FIXED CODE ###

str = input()
a = str.split(" ")
c = int(a[0])*int(a[1])
if c%2 == 0:
    print("Even")
else:
    print("Odd")
n = int(input())
d =list(map(int,input().split()))

s = 0

for i in range(n):
  	for j in range(i+1,n):
      	s += d[i] * d[j]
print(s)

### FIXED CODE ###

n = int(input())
d =list(map(int,input().split()))
s = 0
for i in range(n):
    for j in range(i+1,n):
       s += d[i] * d[j]
print(s)
n = int(input())
string_list=[input() for i in range(n)]
c = collections.Counter(string_list)
print(len(c))



### FIXED CODE ###

n = int(input())
s = [input() for _ in range(n)]
print(len(set(s)))
A, B, C = map(int, input().split())
if A + B => C:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

A, B, C = map(int, input().split())
if A + B >= C:
  print("Yes")
else:
  print("No")
a=int(input())
b=int(input())
print(a*b)
print(2*(a+b))

### FIXED CODE ###

a, b = map(int, input().split(' '))
print( a * b, 2 * a + 2 * b)
a,b,c,k=map(int,input().split())

if k%2 == 0:
  if abs(a-b)<=10**18:print(a-b)
elif ans(b-a)<=10*18:print(b-a)
else:print("Unfair")   

### FIXED CODE ###

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

if k%2 == 0 and abs(a-b)<=10**18:print(a-b)
elif k%2 != 0 and abs(b-a)<=10**18:print(b-a)
else:print("Unfair")
def chmin(dp, idx, a, b):
    if a > b:
        dp[idx] = b
        return True
    else:
        return False
def rec(dp, i):
    INF = 10**9
    if dp[i] < INF:
        return dp[i]
    if i == 0:
        return 0
    chmin(dp, i, dp[i], rec(dp, i-1) + abs(h[i]-h[i-1]))
    if i > 1:
        chmin(dp, i, dp[i], rec(dp, i-2) + abs(h[i]-h[i-2]))
    return dp[i]
def dp(N, h):
    INF = 10 ** 9
    dp = [INF] * N
    dp[0] = 0
    rec(dp, N-1)
    return dp
N = int(input())
h = list(map(int, input().split(' ')))
dp = dp(N, h)
print(dp[N-1])

### FIXED CODE ###

def chmin(dp, idx, a, b):
    if a > b:
        dp[idx] = b
        return True
    else:
        return False
def dp(N, h):
    INF = 10 ** 9
    dp = [INF] * N
    dp[0] = 0
    for i in range(1, N):
        chmin(dp, i, dp[i], dp[i-1] + abs(h[i]-h[i-1]))
        if i < 2:
            continue
        chmin(dp, i, dp[i], dp[i-2] + abs(h[i]-h[i-2]))
    return dp
N = int(input())
h = list(map(int, input().split(' ')))
dp = dp(N, h)
print(dp[N-1])
in, k = map(int, input().split())
    h = [int(i) for i in input().split()]
    # dpの最小値を変更する関数
    def chmin(a, b):
        if a > b:
            return b
        else:
            return a
    # 無限大の値
    f_inf = pow(10,9)+11
    # DP テーブルを初期化　(最小化問題なので INF に初期化)
    dp = [f_inf] * (10**5+10)
    # 初期条件
    dp[0] = 0
    for i in range(1, n):
        for j in range(1, k+1):
            if i - j >= 0:
                dp[i] = chmin(dp[i], dp[i-j]+ abs(h[i] - h[i - j]))
    print(dp[n-1])

### FIXED CODE ###

n, k = map(int, input().split())
h = [int(i) for i in input().split()]

def chmin(a, b):
    if a > b:
        return b
    else:
        return a
f_inf = pow(10,9)+99

dp = [f_inf] * (10**5+10)
dp[0] = 0
for i in range(1, n):
    for j in range(1, k+1):
        if i - j >= 0:
            dp[i] = chmin(dp[i], dp[i-j]+ abs(h[i] - h[i - j]))
print(dp[n-1])
def abc168_c():
    A, B, H, M = map(int, input().split())
    # 時針の位相
    h_angle = 30 * H + 0.5 * M
    # 分針の位相
    m_angle = 6 * M
    # x方向
    x_dist = A * math.cos(math.radians(h_angle)) - B * math.cos(math.radians(m_angle))
    # y方向
    y_dist = A * math.sin(math.radians(h_angle)) - B * math.sin(math.radians(m_angle))
    # 距離
    dist = math.sqrt(x_dist ** 2 + y_dist ** 2)
    print('{:.12f}'.format(dist))

abc168_c()

### FIXED CODE ###

import math

def abc168_c():
    A, B, H, M = map(int, input().split())
    # 時針の位相
    h_angle = 30 * H + 0.5 * M
    # 分針の位相
    m_angle = 6 * M
    # x方向
    x_dist = A * math.cos(math.radians(h_angle)) - B * math.cos(math.radians(m_angle))
    # y方向
    y_dist = A * math.sin(math.radians(h_angle)) - B * math.sin(math.radians(m_angle))
    # 距離
    dist = math.sqrt(x_dist ** 2 + y_dist ** 2)
    print('{:.12f}'.format(dist))

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

A = [int(tmp[i]) for i in range(N)]


score = [None]*(N*N)
for i in range(N):
    for j in range(N):
        score[i*N+j] = A[i] + A[j]
score.sort()
sum = 0
for i in range(M):
    sum += score[N*N-1-i]
print(sum)

### FIXED CODE ###

# 二分探索を利用した
N, M = map(int, input().split())
tmp = input().split()

A = [int(tmp[i]) for i in range(N)]
A.sort()
cum_A = [None]*N
cum_A[N-1] = A[N-1]
for i in range(1,N):
    cum_A[N-1-i] = cum_A[N-i] + A[N-1-i]
cum_A.append(0)


def geq(A, cum_A, X, N):  # ある定数X以上になる握手の方法が何通りあるか,Aは昇順sort済み
    sum = 0
    val = 0
    index = 0
    for i in range(N):
        while True:
            if index != N and A[i] + A[N - 1 - index] >= X:
                index += 1
            else:
                sum += index
                val += A[i] * index + cum_A[N-index]
                break
    return sum, val

# 2<=X<=2*Nで二分探索をする
low = 2
high = 2*A[N-1]
while low <= high:
    X = (low + high)//2
    sum, val = geq(A, cum_A, X, N)
    if sum == M:
        break
    elif sum > M:
        low = X+1
    else:
        high = X-1
if sum < M:
    X -= 1
sum, val = geq(A, cum_A, X, N)
ans = val - X*(sum-M)
print(ans)
import math 
r=int(input())

a=math.pi*r**2
c=2*math.pi*r

print(a, c)


### FIXED CODE ###



from math import pi

r= float(input())

print("{} {}".format(r*r*pi,2*pi*r))
a, b, c = map(int, input().split())

if (a < b and b < c):
    print "Yes"
else:
    print "No" 

### FIXED CODE ###

a, b, c = raw_input().split()

if (a < b < c):
    print "Yes"
else:
    print "No"
a, b, c, d = map(int,input().split())
A = ["Left", "Balanced", "Right"]
print(A[(c+d) // (a+b) - (a+b) // (c+d) + 1])

### FIXED CODE ###

a, b, c, d = map(int,input().split())
A = ["Left", "Balanced", "Right"]
print(A[int((c+d) > (a+b)) - int((a+b) > (c+d)) + 1])
n = int(input())

s = 0
while True:
    x = n % 10
    s += x
    n = int(n/10)
    if(n==0):
        break
if s%9==0:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

n = input()

s = 0
for i in range(0,len(n)):
    s += int(n[i:i+1])

if s%9==0:
    print("Yes")
else:
    print("No")
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    for i in range(N-1):
        print(A.count(i+1))
    print("0")
resolve()

### FIXED CODE ###

S = int(input())
print(S*2*3.14)
n,y=map(int,input().split())
for i in range(n):
    for j in range(n-i+1):
        if 10000*i+5000*j+1000*(n-i-j)==y:
            print(i,j,(n-i-j))
            exit()
print("-1 -1 -1")

### FIXED CODE ###

s=list(input())
s[3]='8'
for i in range(len(s)):
    print(s[i],end='')
s=list(input())
if s[3]=s[4] and s[5]=s[6]:
print('Yes')
else:
print('No')

### FIXED CODE ###

s=list(input())
if s[3]==s[2] and s[5]==s[4]:
	print('Yes')
else:
	print('No')
from math import sqrt
from collections import deque
M = 10**6
prime = [1]*(M+1)
prime[0] = prime[1] = 0
for i in xrange(2, int(sqrt(M))+1):
    if prime[i]:
        for j in xrange(i*i, M+1, i):
            prime[j] = 0
P = {(0, 0): 1}; R = [None, (0, 0)]
c = 1; i = 1; p = 1
x = y = 0
while c < M:
    for j in xrange(i):
        x += p; c += 1
        P[x, y] = c; R.append((x, y))
    for j in xrange(i):
        y -= p; c += 1
        P[x, y] = c; R.append((x, y))
    p = -p
    i += 1
deq = deque()
R = [-1, 0, 1]
while 1:
    m, n = map(int, raw_input().split())
    if m == n == 0:
        break
    deq.append(n)
    cnts = {n: prime[n]}
    used = set()
    while deq:
        v = deq.popleft()
        x, y = R[v]
        for dx in R:
            t = P.get((x+dx, y+1), M+1)
            if t <= m:
                cnts[t] = max(cnts[v] + prime[t], cnts.get(t, 0))
                if t not in used:
                    deq.append(t)
                    used.add(t)
    vals = sorted((v, k) for k, v in cnts.items() if prime[k])
    print "%d %d" % vals[-1] if vals else "0 0"

### FIXED CODE ###

from math import sqrt
from collections import deque
M = 10**6
prime = [1]*(M+1)
prime[0] = prime[1] = 0
for i in xrange(2, int(sqrt(M))+1):
    if prime[i]:
        for j in xrange(i*i, M+1, i):
            prime[j] = 0
P = {(0, 0): 1}; R = [None, (0, 0)]
c = 1; i = 1; p = 1
x = y = 0
while c < M:
    for j in xrange(i):
        x += p; c += 1
        P[x, y] = c; R.append((x, y))
    for j in xrange(i):
        y -= p; c += 1
        P[x, y] = c; R.append((x, y))
    p = -p
    i += 1
deq = deque()
dd = [-1, 0, 1]
while 1:
    m, n = map(int, raw_input().split())
    if m == n == 0:
        break
    deq.append(n)
    cnts = {n: prime[n]}
    used = set()
    while deq:
        v = deq.popleft()
        x, y = R[v]
        for dx in dd:
            t = P.get((x+dx, y+1), M+1)
            if t <= m:
                cnts[t] = max(cnts[v] + prime[t], cnts.get(t, 0))
                if t not in used:
                    deq.append(t)
                    used.add(t)
    vals = sorted((v, k) for k, v in cnts.items() if prime[k])
    print "%d %d" % vals[-1] if vals else "0 0"
import sys

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

val_1 = A / 0.08
val_2 = B / 0.10

i = 1

if int(val_1) == int(val_2):
    print(int(val_1))
    sys.exit()
else:
    if val_1 > val_2:
        while val_1 != val_2:
            val_2 = (B + 0.1*i)/0.1
            i += 1
            if val_1 < val_2:
				print(-1)
				sys.exit()
		print(int(val_1))
	elif val_1 < val_2:
        while val_1 != val_2:
            val_1 = (A + 0.1*i)/0.1
            i += 1
            if val_1 > val_2:
                print(-1)
                sys.exit()
        print(int(val_1))

### FIXED CODE ###

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

ans = -1

for i in range(10000,-1,-1):
    tax1 = int(i * 0.08)
    tax2 = int(i * 0.10)
    if tax1 == A and tax2 == B:
        ans = i

print(ans)