Harryxun/stf_run huggingface dataset:
def get_colored_cells():
    N = input()
    A = input()
    return N ** 2 - A

get_colored_cells()

### FIXED CODE ###

def get_colored_cells():
    N = int(input())
    A = int(input())
    print(N ** 2 - A)

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

l=[]
for _ in range(n):
  l1=[map(int,input().split())]
  l.append(l1)

import math

ans=[]
for a in range(n):
  for b in range(n):
    a=0
    for c in range(d):
      D=(l[a][c]-l[b][c])**2
      a+=D
    ans.append(isinstance(math.sqrt(a),int))
      
ans=(ans.count(True)-n)//2
print(ans)

### FIXED CODE ###

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

l=[]
for _ in range(n):
  l1=list(map(int,input().split()))
  l.append(l1)

import math

ans=[]
for a in range(n):
  for b in range(n):
    x=0
    for c in range(d):
      D=(l[a][c]-l[b][c])**2
      x+=D
    y=math.sqrt(x)
    ans.append(y.is_integer())
      
ans=(ans.count(True)-n)//2
print(ans)
def dfs(v,cnt):
    dist[v]=cnt
    for nv in graph[v]:
        if dist[nv]<=cnt+1:
            continue 
        guide[nv]=v
        dfs(nv,cnt+1)

n,m=map(int,input().split())
graph=[[] for _ in range(n+1)]
dist=[float("inf") for _ in range(n+1)]
guide=[0 for _ in range(n+1)]

for _ in range(m):
    a,b=map(int,input().split())
    graph[a].append(b)
    graph[b].append(a)

dfs(1,0)

print("Yes")
print(*guide[2:],sep="\n")   

### FIXED CODE ###

import queue
n,m=map(int,input().split())
graph=[[] for _ in range(n+1)]
dist=[-1 for _ in range(n+1)]
guide=[0 for _ in range(n+1)]

for _ in range(m):
    a,b=map(int,input().split())
    graph[a].append(b)
    graph[b].append(a)

que=queue.Queue()
dist[1]=0
que.put(1)

while not que.empty():
    v=que.get()
    for nv in graph[v]:
        if dist[nv]!=-1:
            continue
        dist[nv]=dist[v]+1
        guide[nv]=v
        que.put(nv)

print("Yes")
print(*guide[2:],sep="\n")
import sympy

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

def fctr1(n): 
    f = {}
    c = 0
    r = int(n ** 0.5)
    for i in range(2, r + 2):
        while n % i == 0:
            c += 1
            n = n // i
        if c != 0:
            f[i] = c
            c = 0
    if n != 1:
        f[n] = 1
    return f


a = fctr1(A)
b = fctr1(B)


cd_dic = {1: 1}
key_list = [1]

for k, v in a.items():
    if k in b:
        key_list.append(k)
        n = min(v, b[k])
        cd_dic[k] = n

print(len(cd_dic))


### FIXED CODE ###

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

def fctr1(n): 
    f = {}
    c = 0
    r = int(n ** 0.5)
    for i in range(2, r + 2):
        while n % i == 0:
            c += 1
            n = n // i
        if c != 0:
            f[i] = c
            c = 0
    if n != 1:
        f[n] = 1
    return f


a = fctr1(A)
b = fctr1(B)


cd_dic = {1: 1}
key_list = [1]

for k, v in a.items():
    if k in b:
        key_list.append(k)
        n = min(v, b[k])
        cd_dic[k] = n

print(len(cd_dic))
n,a,b=map(int,input().split())
if a==0:
    print(0)
else:
    blue=['b']*a
    red=['r']*b
    s=blue+red
    ans=(s[:n%(a+b)].count('b')) + (a*(n//(a+b)))
    print(ans)

### FIXED CODE ###

n,a,b=map(int,input().split())
if a==0:
    print(0)
else:
    ans=(min(n%(a+b),a) + (a*(n//(a+b))))
    print(ans)
N =  map(int,input().split())

a = []
for i in range(N):
    a.append(map(int, input().split())
N = N+1


for i in range(N):
    v = a[i]
    j = i-1
    while j>=0 and a[j]>v:
        a[j+1] = a[j]
        j = j-1
        a[j+1] = v
    print(a) 


### FIXED CODE ###

N = int(input())
a = input().split()
b = [int(n) for n in a]


for i in range(N):
    v = b[i]
    j = i-1
    while j>=0 and b[j]>v:
        b[j+1] = b[j]
        j = j-1
        b[j+1] = v
    print(" ".join([str(n) for n in b]))
T1, T2 = map(int, input().split())
A1, A2 = map(int, input().split())
B1, B2 = map(int, input().split())
dist_lap1 = T1 * A1 + T2 * A2
dist_lap2 = T1 * B1 + T2 * B2
if dist_lap1 == dist_lap2:
    print("infinity")
else:
    if dist_lap1 > dist_lap2:
        diff = T1 * B1 - T1 * A1
        if diff < 0:
            print(0)
        else:
            if diff % (dist_lap1 - dist_lap2) == 0:
                print((diff // (dist_lap1 - dist_lap2)) * 2)
            else :
                print((diff // (dist_lap1 - dist_lap2)) * 2 + 1)
    else:
        diff = T1 * A1 - T1 * B1
        if diff < 0:
            print(0)
        else:
            if diff % (dist_lap2 - dist_lap2) == 0:
                print((diff // (dist_lap2 - dist_lap1)) * 2)
            else :
                print((diff // (dist_lap2 - dist_lap1)) * 2 + 1)

### FIXED CODE ###

T1, T2 = map(int, input().split())
A1, A2 = map(int, input().split())
B1, B2 = map(int, input().split())
dist_lap1 = T1 * A1 + T2 * A2
dist_lap2 = T1 * B1 + T2 * B2
if dist_lap1 == dist_lap2:
    print("infinity")
else:
    if dist_lap1 > dist_lap2:
        diff = T1 * B1 - T1 * A1
        if diff < 0:
            print(0)
        else:
            if diff % (dist_lap1 - dist_lap2) == 0:
                print((diff // (dist_lap1 - dist_lap2)) * 2)
            else :
                print((diff // (dist_lap1 - dist_lap2)) * 2 + 1)
    else:
        diff = T1 * A1 - T1 * B1
        if diff < 0:
            print(0)
        else:
            if diff % (dist_lap2 - dist_lap1) == 0:
                print((diff // (dist_lap2 - dist_lap1)) * 2)
            else :
                print((diff // (dist_lap2 - dist_lap1)) * 2 + 1)
int A, B, C
A = input()
B = input()
if A == 2 or B == 2:
  print("No")
  
elif C == 1 or C ==3:
  print("Yes")

### FIXED CODE ###

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

if (A == 2) or (B == 2):
  print("No")
  
else:
  print("Yes")
x,a,b = map(int,input(),split())
if abs(x-a) >= abs(x-b):
  print('A')
else:
  print('B')

### FIXED CODE ###

x,a,b = map(int,input().split())
if abs(x-a) >= abs(x-b):
  print('B')
else:
  print('A')
class Atc_072b:
    def __init__(self, s: str) -> str:
        self.s = s

    def odd(self):
        s_odd = ""
        for i in range(0, len(self.s)):
            if i % 2 == 0:
                s_odd += self.s[i]
        return s_odd


s_input = input()
print(Atc_072b(s_input).odd())
© 2020 GitHub, Inc.

### FIXED CODE ###

# 072b
class Atc_072b:
    def __init__(self, s: str) -> str:
        self.s = s

    def odd(self):
        s_odd = ""
        for i in range(0, len(self.s)):
            if i % 2 == 0:
                s_odd += self.s[i]
        return s_odd


s_input = input()
print(Atc_072b(s_input).odd())
s = list(input())
t = list(input())
s.sort()
t.sort()
s = ''.join(s)
t = ''.join(t)

[print('Yes') if s < t else print('No')]

### FIXED CODE ###

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

x = (a+b)/2

if x != int(x):
	print(int(x) + 1)
else:
	print(int(x))
a = int(input())
import math
r = a * a * math.pi
r2 = a * 2 * math.pi

print("%.10f %.10f" % (r, r))

### FIXED CODE ###

import math

a = float(input())

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

print("%.10f %.10f" % (r, r2))
# import numpy as np
class UnionFind:
    def __init__(self, n):
        # self.parent = np.array([-1] * n)
        # self.size = np.array([1] * n)
        self.parent = [-1] * n
        self.size = [1] * n
    def find(self, x):
        if self.parent[x] == -1:
            return x
        else:
            a = self.find(self.parent[x])
            self.parent[x] = a
            return a
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x != y:
            self.parent[x] = y
            self.size[y] += self.size[x]
    def get_size(self, x):
        return self.size[self.find(x)]
    def printout(self):
        print(self.parent)
        print(self.size)

N, M, K = map(int, input().split())
uf = UnionFind(N)

ab = [[int(i)-1 for i in input().split()] for j in range(M)]
cd = [[int(i)-1 for i in input().split()] for j in range(K)]

for a, b in ab:
    uf.union(a, b)

ans =[uf.get_size(i) -1 for i in range(N)]

for a, b in ab:
    ans[a] -= 1
    ans[b] -= 1

for c, d in cd:
    if uf.find(c) == uf.find(d):
        ans[c] -= 1
        ans[d] -= 1

print(*ans)

### FIXED CODE ###

import sys #追加
sys.setrecursionlimit(500*500) #追加

class UnionFind:
    def __init__(self, n):
        self.parent = [-1] * n
        self.size = [1] * n
    def find(self, x):
        if self.parent[x] == -1:
            return x
        else:
            a = self.find(self.parent[x])
            self.parent[x] = a
            return a
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x != y:
            self.parent[x] = y
            self.size[y] += self.size[x]
    def get_size(self, x):
        return self.size[self.find(x)]
    def printout(self):
        print(self.parent)
        print(self.size)

N, M, K = map(int, input().split())
uf = UnionFind(N)

ab = [[int(i)-1 for i in input().split()] for j in range(M)]
cd = [[int(i)-1 for i in input().split()] for j in range(K)]

for a, b in ab:
    uf.union(a, b) #RE

ans =[uf.get_size(i)-1 for i in range(N)]

for a, b in ab:
    ans[a] -= 1
    ans[b] -= 1

for c, d in cd:
    if uf.find(c) == uf.find(d):
        ans[c] -= 1
        ans[d] -= 1

print(*ans)
A,B,C,D,E,F = map(int,input().split())

water = set()
sugar = set()

s = 0
a = 0
b = 0

for i in range(30):
    for j in range(30-i):
        if 100*A*i+100*B*j <= F:
            water.add(100*A*i+100*B*j)

water.remove(0)

for i in range(3000):
    for j in range(3000-i):
        if C*i+D*j <= F:
            sugar.add(C*i+D*j)

sugar.remove(0)

WATER = list(water)
SUGAR = list(sugar)

for i in WATER:
    for j in SUGAR:
        if (j <= i*E/100) and (i+j <= F):
            if s == 0:
                s = 100*j /(i + j)
                a = i
                b = j
            else:
                if s < 100*j /(i + j):
                    s = 100*j /(i + j)
                    a = i
                    b = j

if a = 0 and b = 0:
    print(100*A,0)
else:
    print(a+b,b)


### FIXED CODE ###

A,B,C,D,E,F = map(int,input().split())

water = set()
sugar = set()

s = 0
a = 0
b = 0

for i in range(30):
    for j in range(30-i):
        if 100*A*i+100*B*j <= F:
            water.add(100*A*i+100*B*j)

water.remove(0)

for i in range(3000):
    for j in range(3000-i):
        if C*i+D*j <= F:
            sugar.add(C*i+D*j)

sugar.remove(0)

WATER = list(water)
SUGAR = list(sugar)

for i in WATER:
    for j in SUGAR:
        if (j <= i*E/100) and (i+j <= F):
            if s == 0:
                s = 100*j /(i + j)
                a = i
                b = j
            else:
                if s < 100*j /(i + j):
                    s = 100*j /(i + j)
                    a = i
                    b = j

if a == 0 and b == 0:
    print(100*A,0)
else:
    print(a+b,b)
a, b = map(int, input().split())

ans1 = ""
ans2 = ""
for i in range(b):
  ans1.append(a)

for i in range(a):
  ans2.append(b)
  
print(ans1, ans2)

### FIXED CODE ###

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

ans1 = ""
ans2 = ""
for i in range(b):
  ans1 = ans1 + str(a)

for i in range(a):
  ans2= ans2 + str(b)
  
list = []
list.append(ans1)
list.append(ans2)

list.sort()

print(list[0])
import sys
input=sys.stdin.readline()
n=int(input())
for i in range(n):
  if int(input())%2==1:
    print('first')
    quit()
print('second')

### FIXED CODE ###

n=int(input())
for i in range(n):
  if int(input())%2==1:
    print('first')
    quit()
print('second')
N,K=map(int,input().split())
S=list(input())
S=S[0:K-1].append(S[K-1].lower)+S[K-1:]

### FIXED CODE ###

N,K=map(int,input().split())
S=input()
print(S[0:K-1]+S[K-1].lower()+S[K:])
L = []
for i in range(5):
  x = input()
  L.append(x)
K = int(input())
if L[4] - L[0] <= K:
  print('Yay!')
else:
  print(':(')

### FIXED CODE ###

L = []
for i in range(5):
  x = int(input())
  L.append(x)
K = int(input())
if L[4] - L[0] <= K:
  print('Yay!')
else:
  print(':(')
n = int(input())
for i in range(1,n+1):
  if i%3==0 or i%10==3:
    print(" ",i,sep='',end="")
  else:
    pass
print()


### FIXED CODE ###

r,c=map(int, input().split())
S=[]
for num in range(r):
  A=list(map(int, input().split()))
  S.append(A)
  A.append(sum(A))

#print(list(zip(*S)))
C=[]
for t in (zip(*S)):
  C.append(sum(t))
S.append(C)
for i in S:
  print(*i)
a,l="+<"
f,r=print,range(29,-1,-1)
f(60451,l,4,0,3)
s,t=[a,7,7,7],[a,8,8,8]
for i in r:f(a,3,4,7,*s*i,a,5,7,7,l,0,7,7,l,7,3,7,a,4,4,6,*[*[a,3,4,8,*t*j,a,6,8,8,l,1,8,8,l,8,3,8,l,8,7,9,*t*j,a,8,6,6,l,9,7,8,*t*(i+j),a,8,2,2]for j in r],*s*i,a,7,5,5)

### FIXED CODE ###

a,b,c=0,1,2
one,zero=3,4
x,y=5,6
pi,pj=7,8
z=9
def p(i,j,k):print("+",i,j,k)
def l(i,j,k):print("<",i,j,k)
def s(i,j):
    for k in range(j):p(i,i,i)
print(60452)
p(a,b,one);l(zero,one,one)
for i in range(29,-1,-1):
    p(one,zero,pi);s(pi,i)
    p(x,pi,pi);l(a,pi,pi);l(pi,one,pi)
    p(zero,zero,y)
    for j in range(29,-1,-1):
        p(one,zero,pj);s(pj,j)
        p(y,pj,pj);l(b,pj,pj);l(pj,one,pj)
        l(pi,pj,z);l(z,pj,z);s(z,i+j);p(c,z,c)
        s(pj,j);p(y,pj,y)
    s(pi,i);p(x,pi,x)
#71a
x,a,b = map(int,input().split())
print('A' if abs(x-a)<(x-c) else 'B')

### FIXED CODE ###

#71a
x,a,b = map(int,input().split())
print('A' if abs(x-a)<abs(x-b) else 'B')
N = int(input())
testimony = [[] for _ in range(N)]
for i in range(N):
    num = int(input())
    person, state = map(int,input().split())
    testimony[i].append([person-1,state])
#print(testimony)
        
honest = 0
for i in range(1, 2**N):
    flag = 0
    for j in range(N):
        if (i>>j)&1 == 1: # j番目は正直と仮定
            for x,y in testimony[j]:
                if (i>>x)&1 != y: # j番目は正直だが矛盾を発見
                    flag = 1
                    break
    if flag == 0:  # 矛盾がある場合はflag == 1になる
        honest = max(honest, bin(i)[2:].count('1'))  # 1の数をカウントし最大となるものを選択
print(honest)

### FIXED CODE ###

N = int(input())
 
testimony = [[] for _ in range(N)]
 
for i in range(N):
    num = int(input())
    for j in range(num):
        person, state = map(int, input().split())
        testimony[i].append([person-1, state])
        
honest = 0
for i in range(1, 2**N):
    flag = 0
    for j in range(N):
        if (i>>j)&1 == 1: # j番目は正直と仮定
            for x,y in testimony[j]:
                if (i>>x)&1 != y: # j番目は正直だが矛盾を発見
                    flag = 1
                    break
    if flag == 0:  # 矛盾がある場合はflag == 1になる
        honest = max(honest, bin(i)[2:].count('1'))  # 1の数をカウントし最大となるものを選択
print(honest)
from collections import defaultdict
N, *A = map(int, open('0').read().split())
ans = 0
A.sort()
dic = defaultdict(list)
for i, a in enumerate(A):
  dic[a] += [i]
for i in range(N-1,-1,-1):
  a = A[i]
  if dic[a]==[]:
    continue
  dic[a].pop()
  k = 1
  while k<=a:
    k *= 2
  n = k-a
  if dic[n]!=[]:
    dic[n].pop()
    ans += 1
print(ans)


### FIXED CODE ###

from collections import defaultdict
N, *A = map(int, open(0).read().split())
ans = 0
A.sort()
dic = defaultdict(list)
for i, a in enumerate(A):
  dic[a] += [i]
for i in range(N-1,-1,-1):
  a = A[i]
  if dic[a]==[]:
    continue
  dic[a].pop()
  k = 1
  while k<=a:
    k *= 2
  n = k-a
  if dic[n]!=[]:
    dic[n].pop()
    ans += 1
print(ans)
n,k=map(int,input().split())
r,s,p=map(int,input().split())
t=input()
p_list=[]
score=0
for i in range(len(t)):
    if i<k:
        if t[i]=='r':
            p_list.appned('p')
            score+=p
        elif t[i]=='s':
            p_list.appned('r')
            score+=r
        else:
            p_list.appned('s')
            score+=s
    else:
        if t[i]=='r':
            if t[i-k]=='p':
                if i+k>=len(t):
                    score+=0
                else:
                    p_list.appned(t[i+k])
            else:
                p_list.appned('p')
                score+=p
        elif t[i]=='s':
            if t[i-k]=='r':
                if i+k>=len(t):
                    score+=0
                else:
                    p_list.appned(t[i+k])
            else:
                p_list.appned('r')
                score+=r
        else:
            if t[i-k]=='s':
                if i+k>=len(t):
                    score+=0
                else:
                    p_list.appned(t[i+k])
            else:
                p_list.appned('s')
                score+=s
print(score)


### FIXED CODE ###

n,k=map(int,input().split())
r,s,p=map(int,input().split())
t=input()
p_list=[]
score=0
for i in range(len(t)):
    if i<k:
        if t[i]=='r':
            p_list.append('p')
            score+=p
        elif t[i]=='s':
            p_list.append('r')
            score+=r
        else:
            p_list.append('s')
            score+=s
    else:
        if t[i]=='r':
            if p_list[i-k]=='p':
                if i+k>=len(t):
                    p_list.append('a')
                else:
                    p_list.append(t[i+k])
            else:
                p_list.append('p')
                score+=p
        elif t[i]=='s':
            if p_list[i-k]=='r':
                if i+k>=len(t):
                    p_list.append('a')
                else:
                    p_list.append(t[i+k])
            else:
                p_list.append('r')
                score+=r
        else:
            if p_list[i-k]=='s':
                if i+k>=len(t):
                    p_list.append('a')
                else:
                    p_list.append(t[i+k])
            else:
                p_list.append('s')
                score+=s
print(score)
import math
N, K = map(int, input().split())
A = list(map(int, input().split()))

if K > math.log2(N):
    for _ in range(N):
        print(N," ", end = "")
    print()
else:
    for i in range(K):
        cum_sum = [0]*N
        for j in range(N):
            left = max(0, j - A[j])
            right = min(N-1, j+A[j])
            cum_sum[left] += 1
            if right + 1 < N:
                cum_sum[right+1] -= 1
        A[0] = cum_sum[0]
        changed=False
        for j in range(N-1):
            cum_sum[j+1] += cum_sum[j]
            if A[j+1] != cum_sum[j+1]:
              	changed = True
            	A[j+1] = cum_sum[j+1]
        if not changed:
          break
    for i in range(N):
        print(A[i], " ", end = "")
    print()


### FIXED CODE ###

# original submission: https://atcoder.jp/contests/tokiomarine2020/submissions/14259812
import math
N, K = map(int, input().split())
A = list(map(int, input().split()))

if K > 4 * math.log2(N):
    for _ in range(N):
        print(N," ", end = "")
    print()
else:
    for i in range(K):
        cum_sum = [0]*N
        for j in range(N):
            left = max(0, j - A[j])
            right = min(N-1, j+A[j])
            cum_sum[left] += 1
            if right + 1 < N:
                cum_sum[right+1] -= 1
        A[0] = cum_sum[0]
        for j in range(N-1):
            cum_sum[j+1] += cum_sum[j]
            A[j+1] = cum_sum[j+1]

            
    for i in range(N):
        print(A[i], " ", end = "")
    print()
N, M, K= map(int, input().split())
A=list(map(int, input().split()))
B=list(map(int, input().split()))

Asum=[0]
Bsum=[0]

for i in range(N):
    Asum.append(Asum[-1]+A[i])
        
for i in range(M):
    Bsum.append(Bsum[-1]+B[i])
    
m=0
j=M

for i in range(len(Asum)):
    if Asum[i]>K:
        break
    elif Asum[i]+Bsum[j]<=K and m<i+j:
        m=i+j
    elif:
        j-=1
print(m)

### FIXED CODE ###

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

Asum=[0]
Bsum=[0]

for i in range(N):
    Asum.append(Asum[-1]+A[i])
        
for i in range(M):
    Bsum.append(Bsum[-1]+B[i])
    
m=0
j=M

for i in range(len(Asum)):
    if Asum[i]>K:
        break
    while Asum[i]+Bsum[j]>K:
        j-=1
    if m<i+j:
        m=i+j
        
print(m)
def mod(n):
    return n % 2019

import itertools
import numpy as np
import operator as op
L, R = map(int, input().split())

a = list(range(L,R+1))
p = list(itertools.combinations(a, 2))
a1, a2 = map(list, zip(*p))
ans = np.array(a1)*np.array(a2)
ans = map(mod,ans)
print(min(ans))



### FIXED CODE ###

N,A,B = map(int, input().split())
print((B < (N*A)) and B or N*A)
from math import ceil,sqrt,log,gcd,pi
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())

n=int(input())
a=list(map(int,input().split()))
b={}
for i in range(len(a)):
    b[a[i]]=i
a.sort()
x=[]
for i in range(n):
    if i!=b[a[i]]:
        x.append([i,b[a[i]]])
# print(x)
if(len(x)>2):
    print("NO")
elif(len(x)==2 and x[0][0]!=x[1][1]):
    print('NO')
else:
    print("YES")

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
b={}
for i in range(len(a)):
    b[a[i]]=i
a.sort()
x=[]
for i in range(n):
    if i!=b[a[i]]:
        x.append([i,b[a[i]]])
if(len(x)>2):
    print("NO")
elif(len(x)==2 and x[0][0]!=x[1][1]):
    print('NO')
else:
    print("YES")
X = int(input())
t = int(input())

if X-t>0:
    print(X-t)
else:
    print(0)


### FIXED CODE ###

X ,t=map(int,input().split())

if X-t>0:
    print(X-t)
else:
    print(0)
import stdin

year, month, date = stdin.readline().rstrip().split(sep='/')

y = int(year)
m = int(month)
d = int(date)

heisei_y = 2019
heisei_m = 4
heisei_d = 1

if (y < heisei_y):
  print('Heisei');
  else if ( m < heisei_m):
    print('Heisei');
    else if ( d < heisei_d):
      print('Heisei');
      else:
        print('TBD');



### FIXED CODE ###

from sys import stdin


year, month, date = stdin.readline().rstrip().split(sep='/')

y = int(year)
m = int(month)
d = int(date)

heisei_y = 2019
heisei_m = 4
heisei_d = 30

if y < heisei_y:
  print('Heisei')
elif  (y == heisei_y) and (m < heisei_m):
  print('Heisei')
elif  ((y == heisei_y) and m == heisei_m) and (d <= heisei_d):
  print('Heisei')
else:
  print('TBD')
S = input()
cnt = 0
ans = 0
for i in range(len(S)):
    if S[i] == "A" or S[i] == "C" or S[i] == "G" or S[i] == "T":
        cnt += 1
    else:
        ans = max(ans, cnt)
        cnt =
ans = max(ans, cnt)
print(ans)


### FIXED CODE ###

S = input()
cnt = 0
ans = 0
for i in range(len(S)):
    if S[i] == "A" or S[i] == "C" or S[i] == "G" or S[i] == "T":
        cnt += 1
    else:
        ans = max(ans, cnt)
        cnt = 0
ans = max(ans, cnt)
print(ans)
r = float(input())
pi=math.pi
s = ( r ** 2 ) * pi
l = 2 * r * pi
print s, l


### FIXED CODE ###

from math import pi
r = float(input())
print("{:.010f} {:.010f}".format(r * r * pi, 2 * pi * r))