Harryxun/stf_run huggingface dataset:
S,T = input().split()
ptint(T+S)

### FIXED CODE ###

S,T=input().split(" ")
print(T+S)
from sys import exit, stdin
S = stdin.readline().rstrip()
if S[3] == S[4] and S[5] == S[6]:
  print('Yes')
else:
  print('No')


### FIXED CODE ###

from sys import exit, stdin
S = stdin.readline().rstrip()
if S[2] == S[3] and S[4] == S[5]:
  print('Yes')
else:
  print('No')
class node:
    def __init__(self, num):
        self.number     = num
        self.group      = 0
        self.link_node  = []
        self.is_serched = False

def DFS(node, group_num):
    node.is_serched = True
    node.group      = group_num
    for item in node.link_node:
        if item.is_serched == False:
            DFS(item, group_num)

n ,m = map(int, raw_input().split())
node_list = [None] * (n)

for i in xrange(n):
    node_list[i] = node(i)

for _ in xrange(m):
    s, t = map(int, raw_input().split())
    node_list[s].link_node.append(node_list[t])
    node_list[t].link_node.append(node_list[s])

group_num = 1
for item in node_list:
    if item.is_serched == False:
        DFS(item, group_num)
        group_num = group_num + 1

q = input()
for _ in xrange(q):
    s, t = map(int, raw_input().split())
    if node_list[s].group == node_list[t].group:
        print 'yes'
    else:
        print 'no'  

### FIXED CODE ###

Group = [None] * 100001
Edge  = [None] * 100001

def DFS(item, group):
    S = []
    S.append(item)
    Group[item] = group
    while (len(S) != 0):
        S_top = S.pop()
        for link in Edge[S_top]:
            if Group[link] == 0:
                Group[link] = group
                S.append(link)

n, m = map(int, raw_input().split())
for i in xrange(n):
    Edge[i] = []
    Group[i] = 0

for i in xrange(m):
    s, t = map(int, raw_input().split())
    Edge[s].append(t)
    Edge[t].append(s)

group = 1
for i in xrange(n):
    if Group[i] == 0:
        DFS(i, group)
        group = group + 1

q = input()
for _ in xrange(q):
    s, t = map(int, raw_input().split())
    if Group[s] == Group[t]:
        print 'yes'
    else:
        print 'no'
#####コピペ
def BellmanFord(edges, num_v, source):
    # グラフの初期化
    inf = float("inf")
    dist = [-inf for i in range(num_v)]
    dist[source - 1] = 0

    # 辺の緩和
    buf = 0
    for i in range(num_v * 2):
        for edge in edges:
            if dist[edge[1] - 1] < dist[edge[0] - 1] + edge[2]:
                dist[edge[1] - 1] = dist[edge[0] - 1] + edge[2]
                if i >= num_v:
                    dist[edge[1] - 1] = inf
        if i == num_v - 1:
            buf = dist[-1]
    if dist[-1] != buf or dist[-1] == -inf:
        return -1
    return max(dist[-1], 0)
##########################################################################
from scipy.sparse.csgraph import csgraph_from_dense,dijkstra,floyd_warshall
import sys
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
mod = 10**9 + 7
inf = float('inf')
ans = []

N, M, P = LI()
cou = int(0)
maxC = 10000
d = [[float("inf") for i in range(N)] for i in range(N)]
#d[u][v] : 辺uvのコスト(存在しないときはinf)
V = []*M
for i in range(M):
    a, b, c = list(map(int,input().split()))
    V.append((a,b,c-P))
print(BellmanFord(V, N, 1))


#print(ans)



### FIXED CODE ###

#####コピペ
def BellmanFord(edges, num_v, source):
    # グラフの初期化
    inf = float("inf")
    dist = [-inf for i in range(num_v)]
    dist[source - 1] = 0

    # 辺の緩和
    buf = 0
    for i in range(num_v * 2):
        for edge in edges:
            if dist[edge[1] - 1] < dist[edge[0] - 1] + edge[2]:
                dist[edge[1] - 1] = dist[edge[0] - 1] + edge[2]
                if i >= num_v:
                    dist[edge[1] - 1] = inf
        if i == num_v - 1:
            buf = dist[-1]
    if dist[-1] != buf or dist[-1] == -inf:
        return -1
    return max(dist[-1], 0)
##########################################################################
import sys
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
mod = 10**9 + 7
inf = float('inf')
ans = []

N, M, P = LI()
cou = int(0)
maxC = 10000
d = [[float("inf") for i in range(N)] for i in range(N)]
#d[u][v] : 辺uvのコスト(存在しないときはinf)
V = []*M
for i in range(M):
    a, b, c = list(map(int,input().split()))
    V.append((a,b,c-P))
print(BellmanFord(V, N, 1))

#print(ans)
from collections import defaultdict
def main():
    N = int(input())
    ans = 0
    s = defaultdict(int)
    for _ in range(N):
        a = input()
        s[a] += 1
    M = int(input())
    for _ in range(M):
        b = input()
        s[b] -= 1
    for v in s.items():
        ans = max(ans,v[1])
    print(ans)
if __name__ == a__main__":
    main()

### FIXED CODE ###

from collections import defaultdict
def main():
    N = int(input())
    ans = 0
    s = defaultdict(int)
    for _ in range(N):
        a = input()
        s[a] += 1
    M = int(input())
    for _ in range(M):
        b = input()
        s[b] -= 1
    for v in s.items():
        ans = max(ans,v[1])
    print(ans)
if __name__ == "__main__":
    main()
a = list(map(input().split('')))

output = 0

for i in range(len(a)):
    if a[i] == '+':
        output += 1
    elif a[i] == '-':
        output -= 1
}

print(output)


### FIXED CODE ###

a = list(input())

output = 0

for i in a:
    if i == '+':
        output += 1
    elif i == '-':
        output -= 1

print(output)
import sys
import collections
input = lambda: sys.stdin.readline().rstrip("\r\n")

class DFS:

    def __init__(self):
        self.adj = collections.defaultdict(list)
        self.ans = 0

    def addEdge(self, u, v):
        self.adj[u].append(v)
        self.adj[v].append(u)

    def dfs_helper(self, src, visited):
        self.ans += 1
        visited[src] = True
        for i in self.adj[src]:
            if not visited[i]:
                self.dfs_helper(i, visited)

    def dfs(self, src):
        res = - 10 ** 10
        visited = collections.defaultdict(lambda: False)
        for k, v in self.adj.items():
            visited[k] = False
        for k, v in self.adj.items():
            if not visited[k]:
                self.dfs_helper(k, visited)
                res = max(res, self.ans)
                self.ans = 0
        return res


def solve():
    d = DFS()
    n, m = map(int, input().split())
    for _ in range(m):
        u, v = map(int, input().split())
        d.addEdge(u, v)
    print(d.dfs(1))

solve()


### FIXED CODE ###

import sys
input = lambda: sys.stdin.readline().rstrip('\r\n')

class DSU(object):
    
    def __init__(self, n):
        self.parent = [i for i in range(n)]
        self.rank = [1] * n
        self.cycle = False

    def find(self, key):
        if self.parent[key] != key:
            self.parent[key] = self.find(self.parent[key])
        return self.parent[key]

    def union(self, a, b):
        s1, s2 = self.find(a), self.find(b)
        if s1 != s2:
            if self.rank[s1] < self.rank[s2]:
                self.parent[s1] = s2
                self.rank[s2] += self.rank[s1]
            else:
                self.parent[s2] = s1
                self.rank[s1] += self.rank[s2]
        else:
            self.cycle = True
        
    def has_cycle(self):
        return self.cycle
    
    def show_parent(self):
        return self.parent

    def show_rank(self):
        return self.rank

def solve():
    n, m = map(int, input().split())
    d = DSU(n + 1)
    if m > 0:
        for _ in range(m):
            a, b = map(int, input().split())
            d.union(a, b)
        # print(d.show_parent())
        print(max(d.show_rank()))
    else:
        print(1)

solve()
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

A,B,C,X,Y = LI()

# only = A*X+B*Y
# only_mix = C*max(X,Y)*2
# comp = 0
# if X > Y:
#     comp = C*Y*2+A*(X-Y)
# elif X < Y:
#     comp = C*X*2+B*(Y-X)
# else:
#     comp = C*Y*2

# print(min(only,only_mix,comp))

ans = float('INF')
for i in range(max(X,Y)+1):
    price = A+max(X-i,0)+B*max(Y-i,0)+C*2*i
    ans = min(ans,price)

price(ans)

### FIXED CODE ###

import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

A,B,C,X,Y = LI()

only = A*X+B*Y
only_mix = C*max(X,Y)*2
comp = 0
if X > Y:
    comp = C*Y*2+A*(X-Y)
elif X < Y:
    comp = C*X*2+B*(Y-X)
else:
    comp = C*Y*2

print(min(only,only_mix,comp))
S=input()
s=list(S)

odd=[]
even=[]

for i in range(n):
  if i%2==0:
    odd.append(s[i])
  if i%2==1:
    even.append(s[i])

    
oddsum=0
evensum=0

for i in range(len(odd)):
  if odd[i]=="R" or odd[i]=="U" or odd[i]=="D":
    oddsum+=1
  else:
    oddsum+=0

for i in range(len(even)):
  if even[i]=="L" or even[i]=="U" or even[i]=="D":
    evensum+=1
  else:
    evensum=0

if oddsum==len(odd) and evensum==len(even):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

S=input()
s=list(S)
 
odd=[]
even=[]
 
for i in range(len(s)):
  if i%2==0:
    odd.append(s[i])
  if i%2==1:
    even.append(s[i])
 
    
oddsum=0
evensum=0
 
for i in range(len(odd)):
  if odd[i]=="R" or odd[i]=="U" or odd[i]=="D":
    oddsum+=1
  else:
    oddsum+=0
 
for i in range(len(even)):
  if even[i]=="L" or even[i]=="U" or even[i]=="D":
    evensum+=1
  else:
    evensum=0
 
if oddsum==len(odd) and evensum==len(even):
  print("Yes")
else:
  print("No")
S,W = map(int,input())
print('safe' if S > W else 'unsafe')

### FIXED CODE ###

S,W = map(int,input().split())
print('safe' if S > W else 'unsafe')
n=int(input())
w= list(map(int, input().split()))
s=sum(w)
t=0
ans=abs(s-2*a[0])
for i in range(n-1):
  t+=a[i]
  ans=min(ans,abs(s-2*t))
print(ans)

### FIXED CODE ###

n=int(input())
w= list(map(int, input().split()))
s=sum(w)
t=0
ans=abs(s-2*w[0])
for i in range(n-1):
  t+=w[i]
  ans=min(ans,abs(s-2*t))
print(ans)
from math import gcd
n = int(input())
a = list(map(int,input().split()))
l = [0]
r = [0]
ans = 0
for i in range(n-1):
    l.append(gcd(l[i],a[i]))
for i in range(n-1):
    r.append(gcd(r[i],a[n-1-i]))
for i in range(n):
    ans = max(ans,gcd(l[i],r[-i-1]))
print(ans)

### FIXED CODE ###

from fractions import gcd
n = int(input())
a = list(map(int,input().split()))
l = [0]
r = [0]
ans = 0
for i in range(n-1):
    l.append(gcd(l[i],a[i]))
for i in range(n-1):
    r.append(gcd(r[i],a[n-1-i]))
for i in range(n):
    ans = max(ans,gcd(l[i],r[-i-1]))
print(ans)
if a >=3200:
  print(s)
  else:
    print("red")

### FIXED CODE ###

a = int(input())
s = input()
if a>=3200:
  print(s)
else:
  print("red")
def gcd(a,b):
    a,b = max(a,b),min(a,b)
    while b:
        a,b = b,a%b
    return a

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

N,M = map(int,input().split())
A = list(map(lambda x:int(x)//2,input().split()))

if(all(A[0]%2 == a%2 for a in A)):
    lcm_A = lcm(A[0],A[1])
    for a in A[2:]:
        lcm_A = lcm(lcm_A,a)
    print(int((M/lcm_A+1)//2))
else:
    print(0)



### FIXED CODE ###

def cnt_div2(n):
    cnt=0
    while n%2==0:
        n//=2
        cnt+=1
    return cnt
def gcd(a,b):
    a,b = max(a,b),min(a,b)
    while b:
        a,b = b,a%b
    return a

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

N,M = map(int,input().split())
A = list(map(lambda x:int(x)//2,input().split()))

if(all(cnt_div2(A[0]) == cnt_div2(a) for a in A)):
    if N==1:
        lcm_A = A[0]
    else:
        lcm_A = lcm(A[0],A[1])
        for a in A[2:]:
            lcm_A = lcm(lcm_A,a)
    print(int((M/lcm_A+1)//2))
else:
    print(0)
s = input()
t = input()
for _ in range(len(s)):
    s = s[len(s)-1]+"".join([s[i] for i in range(len(s)-1)])
    if s == t:
        print("Yes")
        exit()
        
print("No")

### FIXED CODE ###

data = sorted(list(map(int, input().split())))

print(data[2] - data[0])
import sys
 
nN = int(input())
nK = int(input())
nX = int(input())
nY = int(input())
 
nE = 0
nANs = 0
 
if nN =< nK:
  nAns = nX * nN
  print(nAns)
  sys.exit()
  
nE = nN - nK
 
nAns = nX * nN + nY * nE
print(nAns)
 

### FIXED CODE ###

import sys
 
nN = int(input())
nK = int(input())
nX = int(input())
nY = int(input())
 
nE = 0
nAns = 0
 
if nN <= nK:
  nAns = nX * nN
  print(nAns)
  sys.exit()
  
nE = nN - nK
 
nAns = (nX * nK) + (nY * nE)
print(nAns)
a = int(input())
b = input().split()
x = []
for i in b:
    x.append(int(i))

count = 0

for i in x:
    if i % 2 != 0:
        count += 1

flag = 0
while True:
    z = divmod(count,2)

    #print(z)

    if z[0] == 1:
        break

    if z[1] == 1:
        flag = 1
        break

    count = z[0]

if flag == 1:
    print("NO")
else:
    print("YES")a = int(input())
b = input().split()
x = []
for i in b:
    x.append(int(i))

count = 0

for i in x:
    if i % 2 != 0:
        count += 1

flag = 0
while True:
    z = divmod(count,2)

    #print(z)

    if z[0] == 1:
        break

    if z[1] == 1:
        flag = 1
        break

    count = z[0]

if flag == 1:
    print("NO")
else:
    print("YES")

### FIXED CODE ###


a = int(input())
b = input().split()
x = []
for i in b:
    x.append(int(i))

count = 0

for i in x:
    if i % 2 != 0:
        count += 1

z = divmod(count,2)


if z[1] == 1:
    print("NO")
else:
    print("YES")
# N < 10000
N = int(input())

# len(s) < 10

count = 0
a, b, ba = 0, 0, 0
for i in range(N):
    s = input().rstrip()
    count += s.count("AB")

    if s[-1] == 'A':
        if s[0] == 'B':
            ba += 1
        else:
            a += 1
    elif s[0] == 'B':
        b += 1

#e = int(input())
#print("*A=",a, ", B*=",b, "B*A=",ba, ",AB=", count, ",expected=", e)

if ba > 1:
    count += ba - 1
    ba = 1

if ba == 1:
    c0 = 1 + min(a, b)
count+=max(min(a+ba,b),min(a,b+ba), c0)
print(count)


### FIXED CODE ###

# N < 10000
N = int(input())

# len(s) < 10

count = 0
a, b, ba = 0, 0, 0
for i in range(N):
    s = input().rstrip()
    count += s.count("AB")

    if s[-1] == 'A':
        if s[0] == 'B':
            ba += 1
        else:
            a += 1
    elif s[0] == 'B':
        b += 1

#e = int(input())
#print("*A=",a, ", B*=",b, "B*A=",ba, ",AB=", count, ",expected=", e)

if ba > 1:
    count += ba - 1
    ba = 1

if a + b > 0:
    #count += max(min(a + ba, b),min (a, b + ba))
    count += min(a,b) + ba
print(count)
from collections import Counter
from scipy.special import comb
N = int(input())
s = [''.join(sorted(input())) for _ in range(N)]
ans = 0
for count in Counter(s).values():
    ans += comb(count, 2, exact=True)
print(ans)

### FIXED CODE ###

from collections import Counter
from scipy.misc import comb
N = int(input())
s = [''.join(sorted(input())) for _ in range(N)]
ans = 0
for count in Counter(s).values():
    ans += comb(count, 2, exact=True)
print(ans)
import sys
sys.getrecursionlimit(10**7)

def dfs(v,p,dist):
    for u,v in tree[v]:
        if u==p:
            continue
        else:
            dist[u]=dist[v]+w
            dfs(u,v,dist)
    
n =int(input())
tree = [[] for _ in range(n)]
for _ in range(n-1):
    u,v,w =map(int,input.split())
    tree[u-1].append((v-1,w))
    tree[v-1].append((u-1,w))
dist =[0]*N
dfs(0,-1,dist)

for num in dist:
    if num % 2==0:
        print("1")
    else:
        print("0")

        

### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 7)

def dfs(v, p, dist):
    for u, w in tree[v]:
        if u == p:
            continue
        else:
            dist[u] = dist[v] + w
            dfs(u, v, dist)
 
 
n = int(input())
tree = [[] for _ in range(n)]
for _ in range(n - 1):
    u, v, w = map(int, input().split())
    tree[u - 1].append((v - 1, w))
    tree[v - 1].append((u - 1, w))
 
dist = [0 for _ in range(n)]
dfs(0, -1, dist)
 
for i in dist:
    if i % 2 == 0:
        print(0)
    else:
        print(1)
n,k = map(int,input().split())
if n > 0:
  n = n-k
elif n == 0:
  n = 0
else:
  m = abs(n-k)
print(min(n,m))

### FIXED CODE ###

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

print(min(N%K,abs(N%K-K)))
s = input().split()
print(" ",join(s))

### FIXED CODE ###

s = input().split(",")
print(" ".join(s))
N, M, K = map(int, input().split())
A = [int(x) for x in input().split()]
B = [int(x) for x in input().split()]

total = 0
Asum = sum(A)
nA = len(A)
Bsum = 0
ans = 0
for nB in range(len(B) + 1):
    if nB != 0:
        Bsum += B[nB-1]
    while Asum + Bsum > K:
        nA -= 1
        Asum -= A[nA]
    ans = max(nA + nB, ans)

print(ans)


### FIXED CODE ###

N, M, K = map(int, input().split())
A = [int(x) for x in input().split()]
B = [int(x) for x in input().split()]

total = 0
Asum = sum(A)
nA = len(A)
Bsum = 0
ans = 0
for nB in range(len(B) + 1):
    if nB != 0:
        Bsum += B[nB-1]
    if Bsum > K:
        break
    while Asum + Bsum > K:
        nA -= 1
        Asum -= A[nA]
    ans = max(nA + nB, ans)

print(ans)
abc = [int(input())]
print(sum(abc) - max(abc))

### FIXED CODE ###

abc = list(map(int, input().split()))
print(sum(abc) - max(abc))
S,T=str(input())
A,B=str(input())
U=input()
if U==S:
  A-=1
else:
  B-=1
AN=[A,B]
print(*AN)

### FIXED CODE ###

S,T=map(str,input().split())
A,B=map(int,input().split())
U=input()
if U==S:
  A-=1
else:
  B-=1
AN=[A,B]
print(*AN)
n,k = input().split()
print(k*(k-1)**(n-1))

### FIXED CODE ###

n,k = map(int,input().split())
print(k*(k-1)**(n-1))
from collections import OrderedDict
#初期データ、構造
N,Q = (int(x) for x in input().split())
connection ={i:set() for i in range(1,N+1)}
for i in range(N-1):
    a,b = (int(x) for x in input().split())
    connection[a].add(b)
    connection[b].add(a)
point =OrderedDict({i:0 for i in range(1,N+1)})
#point ={i:0 for i in range(1,N+1)}
for i in range(Q):
    p,x = (int(x) for x in input().split())
    point[p]=x

def DFS(now,prev = -1):
    for next in connection[now]:
        if next == prev:
            continue
        point[next] +=point[now] 
        DFS(next,now)

DFS(1)
print(*point.values())

### FIXED CODE ###

from collections import OrderedDict
import sys
sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
#初期データ、構造
N,Q = (int(x) for x in input().split())
connection ={i:set() for i in range(1,N+1)}
for i in range(N-1):
    a,b = (int(x) for x in input().split())
    connection[a].add(b)
    connection[b].add(a)
#point =OrderedDict({i:0 for i in range(1,N+1)})
point ={i:0 for i in range(1,N+1)}
for i in range(Q):
    p,x = (int(x) for x in input().split())
    point[p] +=x

def DFS(now,prev = -1):
    for next in connection[now]:
        if next == prev:
            continue
        point[next] +=point[now] 
        DFS(next,now)

DFS(1)
print(*point.values())
h, w = map(int, input().split())
for i in range(h):
  	c = input()
    print(c)
    print(c)

### FIXED CODE ###

H, W = map(int, input().split())
for _ in range(H):
    s = input()
    print(s)
    print(s)
def insertion(A, n, g):
    c = 0
    for i in range(g, n):
        key = A[i]
        j = i - g
        while j >= 0 and A[j] > key:
            A[j + g] = A[j]
            j -= g
            c += 1
        A[j + g] = key
    return c

def main():
    n = input()
    A = [input() for i in range(n)]
    h = range(n - 1, 0, -1)
    G = list()
    cnt = 0

    for i in range(n - 1):
        j = insertion(A, n, h[i])
        if j > 0:
            G.append(h[i])
            cnt += j

    print(len(G))
    print(" ".join(map(str, G)))
    print(cnt)
    for i in G:
        print(G[i])

main()

### FIXED CODE ###

def insertion(A, n, g):
    cnt = 0
    for i in range(g, n):
        while i >= g and A[i - g] > A[i]:
            A[i], A[i - g] = A[i - g], A[i]
            i -= g
            cnt += 1
    return cnt

def main():
    n = int(raw_input())
    A = [int(raw_input()) for i in range(n)]

    G = list()
    h = k = 1
    while h <= n:
        G.append(h)
        h = (4 ** k) + (3 * (2 ** (k - 1)) + 1)
        k += 1
    G = G[::-1]

    cnt = 0
    for i in G:
        cnt += insertion(A, n, i)

    print(len(G))
    print(" ".join(map(str, G)))
    print(cnt)
    for j in A: print(j)

main()
import numpy as np
N = int(input())
A = list(input().split())
B = np.array(A,dtype='float64')
B = np.max(B)
if B>=2e18 :
    print("-1")
else:
    A=np.array(A,dtype='int64')
    ans=np.prod(A,dtype='int64')
    if ans >=np.int64(1e18) : flg = 1
    if ans<=np.int64(0)  : flg = 1
    if flg ==1:
        print(ans)
    else:
        print("-1")

### FIXED CODE ###

import numpy as np
N = int(input())
A = list(input().split())

Af =  np.array(A,dtype='float64')
Afans = np.prod(Af,dtype='float64')

if Afans == 0.:
    print('0')
elif Afans >=2e18:
    print('-1')
else:
    Ai =  np.array(A,dtype='int64')
    Aians = np.prod(Ai,dtype='int64')
    if Aians <=np.int64(1e18) and Aians >=np.int64(0):
        print(Aians)
    else:
        print("-1")
import numpy as np
n,m = map(int,input().split())
A = np.zeros((n,n),dtype=np.int8)
for i in range(m):
    a,b = map(int,input().split())
    A[a-1,b-1] = 1
if 1 in A[np.where(A[0] == 1),n-1][0]:
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')

### FIXED CODE ###

import numpy as np
n,m = map(int,input().split())
A1 = np.zeros(n,dtype=bool)
Ai = np.zeros(n,dtype=bool)
for i in range(m):
    a,b = map(int,input().split())
    if a == 1:
        A1[b-1] = True
    if b == n:
        Ai[a-1] = True
if np.any(Ai[A1]):
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')
h,w=map(int,input().split())
if h%2==1 and w%2==1:
  a1=((h+1)//2)*(w+1)//2
  a2=(h//2)*(w//2)
  print(a1+a2)
else:
  print((h*w)//2)


### FIXED CODE ###

k=int(input())
a=[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(a[k-1])
#!/usr/bin/env python

from collections import deque
import itertools as it
import sys

sys.setrecursionlimit(1000000)

while True:
    S_ = raw_input()
    if S_ == '.':
        break

    ans = 0
    for p, q, r in it.product([0, 1, 2], repeat = 3):
        S = S_
        S = S.replace("P", p).replace("Q", q).replace("R", r)
        
        for loop in range(50):
            for loop2 in range(100):
                S_pre = S
                S = S.replace("-0", "2")
                S = S.replace("-1", "1")
                S = S.replace("-2", "0")
                if S == S_pre:
                    break
            for loop2 in range(50):
                S_pre = S
                for a, b in it.product([0, 1, 2], repeat = 2):
                    S = S.replace("(%d*%d)" % (x, y), str(min(x, y)))
                    S = S.replace("(%d+%d)" % (x, y), str(max(x, y)))
                if S == S_pre:
                    break
        if S == "2":
            ans += 1
    print ans


### FIXED CODE ###

#!/usr/bin/env python

from collections import deque
import itertools as it
import sys

sys.setrecursionlimit(1000000)

while True:
    S_ = raw_input()
    if S_ == '.':
        break

    ans = 0
    for p, q, r in it.product([0, 1, 2], repeat = 3):
        S = S_
        S = S.replace("P", str(p)).replace("Q", str(q)).replace("R", str(r))

        while len(S) != 1:
            S = S.replace("-0", "2")
            S = S.replace("-1", "1")
            S = S.replace("-2", "0")
            for a, b in it.product([0, 1, 2], repeat = 2):
                S = S.replace("(%d*%d)" % (a, b), str(min(a, b)))
                S = S.replace("(%d+%d)" % (a, b), str(max(a, b)))
            
        if S == "2":
            ans += 1
    print ans
s=input()
ans=0
l=[]
for i in range(len(s)):
    if s[i] in "ACGT":
        ans+=1        
        
    else:
        l.append(ans)
        ans=0
#print(l)
print(max(l))

### FIXED CODE ###

s=input()
ans=0
l=[]
for i in range(len(s)):
    #print(s[i],s[i]in"ACGT")
    if s[i] in "ACGT":
        ans+=1
    else:
        l.append(ans)
        ans=0
l.append(ans)
print(max(l))