Harryxun/stf_run huggingface dataset:
A = list(map(input().split()))
a = A[0]
b = A[1]
n = len(b)
a = int(a)
b = int(b)
print(n)
jud = a*10**(n)+b
m = int(jud**.5)
print(jud)
if abs(m*m-jud)< 1e-6:
  print('Yes')
else:
  print('No')


### FIXED CODE ###

a = int(input().replace(" ", ""))
 
b = a**0.5
c = b - int(b)
 
if c == 0.0:
    print("Yes")
else:
    print("No")
n=int(input())
s=input()
s_list=list(s)
c=0
if s_list[0] == "#" and s_list[1] == ".":
  c += 1
  s_list[0] = "."
for a in range(n-2):
  if s_list[a+1] == "#" and s_list[a+2] ==  ".":
                     c += 1
                     s_list[a+2] = "#"
print(c)

### FIXED CODE ###

n = int(input())
s = input()
k = 0
si = s.count('.')
m = si
for i in s:
  if i == '#':
    k += 1
  else:
    si -= 1
  m = min(m,k+si)
print(m)
import math
n = int(input())
print(int(n * 2 / math.gcd(n, 2)))

### FIXED CODE ###


n = int(input())
print(n*2 if n%2 == 1 else n)
H, W = map(int, input().split())
px = []
ans = []
for x in range(H):
    px.append(input())
    ans.append(px[x])
    ans.append(px[x])

for x in range(ans):
    print(ans[x])


### FIXED CODE ###

H, W = map(int, input().split())
px = []
ans = []
for x in range(H):
    px.append(input())
    ans.append(px[x])
    ans.append(px[x])

for x in range(len(ans)):
    print(ans[x])
from numpy import*;B=searchsorted;a,b=loadtxt(open(0),'i',skiprows=1);c=0;l=1<<29while l:h=l;l>>=1;y=sort(hstack((b%h-h,b%h)));c+=sum(B(y,h-a%h)-B(y,l-a%h))%2*l
print(c)


### FIXED CODE ###

from numpy import*;B=searchsorted;a,b=loadtxt(open(0),'i',skiprows=1);c=0;l=1<<29
while l:h,l=l,l>>1;y=sort(hstack((b%h-h,b%h)));c+=sum(B(y,h-a%h)-B(y,l-a%h))%2*l
print(c)
41 59 31

### FIXED CODE ###

X, Y, Z = map(int, input().split())
print(Z, X, Y)
a, b = map(int, input.split())
print(a*b)

### FIXED CODE ###

a, b = map(int, input().split())
print(a*b)
n = int(input())
a = list(map(int,input().split()))
if(1 in a):
  ans = 0
  jud = 0
  f = 1
  for i in range(n):
    if(p[0]!=f):
      del p[0]
      ans += 1
    else:
      f += 1
  print(ans)
else:
  print(-1)


### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
if(1 in a):
  ans = 0
  jud = 0
  f = 1
  for i in range(n):
    if(a[i]!=f):
      ans += 1
    else:
      f += 1
  print(ans)
else:
  print(-1)
arg = raw_input().split()

num = int(arg[0]) * int(arg[1])

if (num % 2) == 0:
  print('No')
else:
  print('Yes')

### FIXED CODE ###

arg = input().split()

num = int(arg[0]) * int(arg[1])

if (num % 2) == 0:
  print('No')
else:
  print('Yes')
# -*- coding: utf-8 -*-
"""
D - Various Sushi
https://atcoder.jp/contests/abc116/tasks/abc116_d

"""
import sys

from collections import Counter

def solve(N, K, sushi):
    sushi.sort(key=lambda x: x[1], reverse=True)
    pick = sushi[:K]
    pick_type = set([t for t, d in pick])

    cnt = Counter()
    for t, d in pick:
        cnt[t] += 1

    rem = dict()
    for t, d in sushi:
        if t not in pick_type:
            rem[t] = max(rem.get(t, 0), d)

    res = sorted([[k, v] for k, v in rem.items()], key=lambda x: x[1])

    manzoku = sum([d for t, d in pick])
    ans = [manzoku + len(pick_type)**2]
    while len(pick_type) < K:
        t, d = res.pop()
        pick_type.add(t)
        tt, dd = pick.pop()
        if cnt[tt] > 1:
            cnt[tt] -= 1
            manzoku = manzoku - dd + d
            ans.append(manzoku+ len(pick_type)**2)
    return max(ans)


def main(args):
    N, K = map(int, input().split())
    sushi = [[int(i) for i in input().split()] for _ in range(N)]
    ans = solve(N, K, sushi)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])


### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
D - Various Sushi
https://atcoder.jp/contests/abc116/tasks/abc116_d

"""
import sys

from collections import Counter

def solve(N, K, sushi):
    sushi.sort(key=lambda x: x[1], reverse=True)
    pick = sushi[:K]            #  おいしさポイントの高い方からK個の寿司を選択
    pick_type = set([t for t, d in pick]) # 選択済の種類

    cnt = Counter()             #  各種類の寿司が何個ずつあるか覚えておく
    for t, d in pick:
        cnt[t] += 1

    rem = dict()                #  未選択の種類の寿司のうち、一番おいしさポイントが高い物
    for t, d in sushi:
        if t not in pick_type:
            rem[t] = max(rem.get(t, 0), d)
    res = sorted([[k, v] for k, v in rem.items()], key=lambda x: x[1]) # おいしさで昇順にソート(一番おいしい物が末尾)

    manzoku = sum([d for t, d in pick])
    ans = [manzoku + len(pick_type)**2] #  現在の選択でのスコア、ここから種類を1つずつ増加させていきスコアを計算する
    while len(pick_type) < K and pick and res:
        t, d = res.pop()
        pick_type.add(t)
        tt, dd = pick.pop()
        while cnt[tt] == 1 and pick:
            tt, dd = pick.pop()
        if cnt[tt] > 1:
            cnt[tt] -= 1
            manzoku = manzoku - dd + d
            ans.append(manzoku+ len(pick_type)**2)
    return max(ans)


def main(args):
    N, K = map(int, input().split())
    sushi = [[int(i) for i in input().split()] for _ in range(N)]
    ans = solve(N, K, sushi)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])
import collections
N=int(input())
l=[input() for i in range(N)]
c=collections.Counter(l)
c=c.most_common()
l2=[]

M=c.[0][1]
for i in range(N):
    if c.[i][1]==M:
        l2.append(c.[i][0])
    else:
        break
l2.sort()
for j in range(len(l2)):
    print(l2[j])

### FIXED CODE ###

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

if A==B and B!=C:
    print("Yes")
elif B==C and C!=A:
    print("Yes")
elif C==A and A!=B:
    print("Yes")
else:
    print("No")
import itertools
N=int(input())
l=[]
for i in range(N):
  x,y,h=map(int,input().split())
  l.append([x,y,h])
s=list(itertools.product(range(0,101),repeat=2))
for A,B in itertools.combinations(range(N),2):
  if len(s)==1:
    break
  t=[]
  if l[A][2]>l[B][2]:
    for X,Y in s:
      if abs(X-l[A][0])+abs(Y-l[A][1])<abs(X-l[B][0])+abs(Y-l[B][1]):
        t.append((X,Y))
  elif l[A][2]<l[B][2]:
    for X,Y in s:
      if abs(X-l[A][0])+abs(Y-l[A][1])>abs(X-l[B][0])+abs(Y-l[B][1]):
        t.append((X,Y))
  elif l[A][2]!=0:
    for X,Y in s:
      if abs(X-l[A][0])+abs(Y-l[A][1])==abs(X-l[B][0])+abs(Y-l[B][1]):
        t.append((X,Y))
  s=t[:]
a,b=s[0][0],s[0][1]
h=abs(a-l[0][0])+abs(b-l[0][1])+l[0][2]
print(a,b,h)

### FIXED CODE ###

import itertools
N=int(input())
l=[]
#l:調査情報のリスト
for i in range(N):
  x,y,h=map(int,input().split())
  l.append([x,y,h])
M=max(item[2] for item in l)#高さの最大値(暫定)
s=list(itertools.product(range(0,101),repeat=2))
#s:中心座標の候補リスト
for A,B in itertools.combinations(range(N),2):
  #調査情報の全ての2つ組を用いて絞り込む
  if len(s)==1:
    break
  t=[]
  #t:新たな中心座標の候補リスト
  if l[A][2]<l[B][2]:
    A,B=B,A
  if l[A][2]>l[B][2]:
    #2地点の高さが異なる場合
    if l[B][2]==0:
      #B地点の高さが0ならB地点は中心から[Aの高さ]以上離れている
      gap=l[A][2]-l[B][2]
      for X,Y in s:
        if abs(X-l[A][0])+abs(Y-l[A][1])+gap<=abs(X-l[B][0])+abs(Y-l[B][1]):
          t.append((X,Y))
    else:
      #B地点の高さが0でなければA地点は中心から[Aの高さ-Bの高さ]だけ離れている
      gap=l[A][2]-l[B][2]
      for X,Y in s:
        if abs(X-l[A][0])+abs(Y-l[A][1])+gap==abs(X-l[B][0])+abs(Y-l[B][1]):
          t.append((X,Y))
  
  elif l[A][2]!=0:
    #2地点の高さが等しく0ではない場合
    #2地点からM-[Aの高さ]以上離れた地点のみ残す
    for X,Y in s:
      MM=max(1,M-l[A][2])
      if abs(X-l[A][0])+abs(Y-l[A][1])==abs(X-l[B][0])+abs(Y-l[B][1]) and abs(X-l[A][0])+abs(Y-l[A][1])>=MM and abs(X-l[B][0])+abs(Y-l[B][1])>=MM:
        t.append((X,Y))
  else:
    #2地点の高さが等しく0の場合
    #2地点からM以上離れた地点のみ残す
    for X,Y in s:
      if abs(X-l[A][0])+abs(Y-l[A][1])>=M and abs(X-l[B][0])+abs(Y-l[B][1])>=M:
        t.append((X,Y))
  s=t[:]
#sの要素は唯一だと思いたい
a,b=s[0][0],s[0][1]
i=0
while l[i][2]==0:
  i+=1

h=abs(a-l[i][0])+abs(b-l[i][1])+l[i][2]
print(a,b,h)
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

count = 0
ar = [0] * (N)
br = [0] * (M)

ar[0] = A[0]
for i, v in enumerate(A):
    ar[i+1] = ar[i] + v

br[0] = B[0]
for i, v in enumerate(B):
    br[i+1] = br[i] + v

max_read = 0
j = M
for i in range(N+1):
    rest = K - ar[i]
    if rest <= 0:
        break
    while br[j] > K - ar[i]:
        j -= 1

    max_read = max(max_read, i+j)

print(max_read)


### FIXED CODE ###

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

count = 0
ar = [0] * (N + 1)
br = [0] * (M + 1)

for i, v in enumerate(A):
    ar[i+1] = ar[i] + v

for i, v in enumerate(B):
    br[i+1] = br[i] + v

max_read = 0
j = M
for i in range(N+1):
    if ar[i] > K:
        break
    while br[j] > K - ar[i]:
        j -= 1
    max_read = max(max_read, i+j)

print(max_read)
import sys
input = sys.stdin.readline

X,Y,Z,K = (int(i) for i in input().split())
ax = [int(i) for i in input().split()]
by = [int(i) for i in input().split()]
cz = [int(i) for i in input().split()]
ans = [0] * 3000
cnt = 0
for i in ax:
  for j in by:
    for k in cz:
      ans[cnt] = i + j + k
      cnt += 1
ans.sort(reverse=True)
for i in range(K):
  print(ans[i])

### FIXED CODE ###

import heapq

X,Y,Z,K = (int(i) for i in input().split())
a = [-int(i) for i in input().split()]
b = [-int(i) for i in input().split()]
c = [-int(i) for i in input().split()]
q = []
S = set()
a.sort()
b.sort()
c.sort()

heapq.heappush(q,(a[0]+b[0]+c[0],0,0,0))

for i in range(K):
  p,i,j,k=heapq.heappop(q)
  print(-p)
  if i+1 < X and not((i+1,j,k) in S):
    S.add((i+1,j,k))
    heapq.heappush(q,(a[i+1]+b[j]+c[k],i+1,j,k))
  if j+1 < Y and not((i,j+1,k) in S):
    S.add((i,j+1,k))
    heapq.heappush(q,(a[i]+b[j+1]+c[k],i,j+1,k))
  if k+1 < Z and not((i,j,k+1) in S):
    S.add((i,j,k+1))
    heapq.heappush(q,(a[i]+b[j]+c[k+1],i,j,k+1))
N = int(input())

Graph = [[] for _ in range(N+10)]
dist  = [10000000000000]*(N+10)

for i in range(N-1):
	u,v,w = map(int,input().split())
	u-=1
	v-=1
	Graph[u].append((v,w))
	Graph[v].append((u,w))

dist[0] = 0

def func(fromE,now,length):
	if fromE != -1:
		dist[now] = dist[fromE]+length
	for i in range(len(Graph[now])):
		target = Graph[now][i][0]
		lengt  = Graph[now][i][1]

		if target == fromE:
			continue

		func(now,target,lengt)

func(-1,0,0)

for i in range(N):
	if dist[i]%2 == 0:
		print(0)
	else:
		print(1)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)
N = int(input())

Graph = [[] for _ in range(N+10)]
dist  = [10000000000000]*(N+10)

for i in range(N-1):
	u,v,w = map(int,input().split())
	u-=1
	v-=1
	Graph[u].append((v,w))
	Graph[v].append((u,w))

dist[0] = 0

def func(fromE,now,length):
	if fromE != -1:
		dist[now] = dist[fromE]+length
	for i in range(len(Graph[now])):
		target = Graph[now][i][0]
		lengt  = Graph[now][i][1]

		if target == fromE:
			continue

		func(now,target,lengt)

func(-1,0,0)

for i in range(N):
	if dist[i]%2 == 0:
		print(0)
	else:
		print(1)
import math
N=int(input())
ans=len(str(N))
for a in range(2,math.sqrt(N**0.5)+1):
    if N%a==0:
        b=N//a
        ans=min(ans,len(str(b)))
print(ans)

### FIXED CODE ###

N=int(input())
ans=len(str(N))
for a in range(2,int(N**0.5)+1):
    if N%a==0:
        b=N//a
        ans=min(ans,len(str(b)))
print(ans)
N = int(input())
X = {}
for i in range(2,32):
  for j in range(2, 10):
    if pow(i,j) <= X:
      X.add(pow(i, j))
    else:
      break
print(max(X))

    

### FIXED CODE ###

N = int(input())
X = set()
for i in range(1,32):
  for j in range(2, 10):
    if pow(i,j) <= N:
      X.add(pow(i, j))
    else:
      break
print(max(X))
a,b = map(int, input().split())
if a == b:
  print('Yes')
else:
  print('No)

### FIXED CODE ###

a,b = map(int, input().split())
if a == b:
  print('Yes')
else:
  print('No')
N, M = map(int, input().split())
G = [[] for i in range(N + 1)]
for i in range(M):
    l, r, d = map(int, input().split())
    l, r = l - 1, r - 1
    G[l].append((r, d))
    G[r].append((l, -d))
used = [False] * (N + 1)
dist = [0] * (N + 1)
flag = False


def dfs(v, d0):
    global flag
    if used[v]:
        if dist[v] != d0:
            flag = True
        return
    else:
        used[v] = True
        dist[v] = d0

    if len(G[v]) != 0:
        for w, d1 in G[v]:
            dfs(w, d0 + d1)


for i in range(1, N + 1):
    if not used[i]:
        dfs(i, 0)

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


### FIXED CODE ###

import sys
sys.setrecursionlimit(200002)
N, M = map(int, input().split())
G = [[] for i in range(N)]
for i in range(M):
    l, r, q = map(int, input().split())
    G[l - 1].append((r - 1, q))
    G[r - 1].append((l - 1, -q))
X = [None] * N


def dfs(u):
    global X, G
    for w, d in G[u]:
        if X[w] is None:
            X[w] = X[u] + d
            if not dfs(w):
                return False
        else:
            if X[w] != X[u] + d:
                return False

    return True


flag = True
for i in range(N):
    if X[i] is None:
        X[i] = 0
        flag &= dfs(i)

if flag:
    print("Yes")
else:
    print("No")
# -*- coding: utf-8 -*-
"""
https://beta.atcoder.jp/contests/abc082/tasks/arc087_b

"""
import sys
from sys import stdin
input = stdin.readline


def check_x(forwards):
    n = sum(forwards[::2])      #  x軸方向への最大移動量
    dpx = [False] * (n * 2 + 1) #  真ん中を0として、±両方向のdp領域を確保
    dpx[forwards[0] + n] = True #  最初は0からプラス方向に移動

    for f in forwards[2::2]:
        if f == 0:
            continue
        n_move = dpx[f:] + [False]*f
        p_move = [False]*f + dpx[:-f]
        t = [a or b for a, b in zip(n_move, p_move)]
        dpx = t
    return dpx, n


def check_y(forwards):
    n = sum(forwards[1::2])
    dpy = [False] * (n * 2 + 1)
    dpy[n] = True

    for f in forwards[1::2]:
        if f == 0:
            continue
        n_move = dpy[f:] + [False]*f
        p_move = [False]*f + dpy[:-f]
        t = [a or b for a, b in zip(n_move, p_move)]
        dpy = t
    return dpy, n


def solve(s, gx, gy):
    forwards = [len(x) for x in s.split('T')] #  進む歩数情報の数字に変換
    dpx, zx = check_x(forwards)
    dpy, zy = check_y(forwards)

    if zx < gx:
        return 'No'
    if zy < gy:
        return 'No'
    if dpx[gx + zx] is True and dpy[gy + zy] is True:
        return 'Yes'
    else:
        return 'No'


def main(args):
    s = input().strip()
    gx, gy = map(int, input().split())
    ans = solve(s, gx, gy)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])
    


### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
https://beta.atcoder.jp/contests/abc082/tasks/arc087_b

"""
import sys
from sys import stdin
input = stdin.readline


def check_x(forwards):
    n = sum(forwards[::2])      #  x軸方向への最大移動量
    dpx = [False] * (n * 2 + 1) #  真ん中を0として、±両方向のdp領域を確保
    dpx[forwards[0] + n] = True #  最初は0からプラス方向に移動

    for f in forwards[2::2]:
        if f == 0:
            continue
        n_move = dpx[f:] + [False]*f
        p_move = [False]*f + dpx[:-f]
        t = [a or b for a, b in zip(n_move, p_move)]
        dpx = t
    return dpx, n


def check_y(forwards):
    n = sum(forwards[1::2])
    dpy = [False] * (n * 2 + 1)
    dpy[n] = True

    for f in forwards[1::2]:
        if f == 0:
            continue
        n_move = dpy[f:] + [False]*f
        p_move = [False]*f + dpy[:-f]
        t = [a or b for a, b in zip(n_move, p_move)]
        dpy = t
    return dpy, n


def solve(s, gx, gy):
    forwards = [len(x) for x in s.split('T')] #  進む歩数情報の数字に変換
    dpx, zx = check_x(forwards)
    dpy, zy = check_y(forwards)

    if zx < abs(gx):
        return 'No'
    if zy < abs(gy):
        return 'No'
    if dpx[gx + zx] is True and dpy[gy + zy] is True:
        return 'Yes'
    else:
        return 'No'


def main(args):
    s = input().strip()
    gx, gy = map(int, input().split())
    # s = 'F'
    # gx, gy = -1, 0
    ans = solve(s, gx, gy)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])
m,n = map(int(input().split()))

print(m*n)

### FIXED CODE ###

m, n = map(int, input().split())
print(m * n)
n = int(input())
f_dict = {}
s_dict = {}
cnt_all = 0
for i in range(n):
  moji = str(i+1)
  if f_dict[[moji[0]+moji[-1]] == "":
    f_dict[moji[0]+moji[-1]] = 0
  else:
    f_dict[[moji[0]+moji[-1]]+= 1 
  if s_dict[[moji[-1]+moji[0]] == "":
    f_dict[[moji[-1]+moji[0]] = 0
  else:
    f_dict[[moji[-1]+moji[0]] += 1
for mykey in f_dict.keys():
  cnt_all += f_dict[mykey] * s_dict[mykey]
print(cnt_all)

### FIXED CODE ###

n = int(input())
f_dict = {}
s_dict = {}
cnt_all = 0
for i in range(n):
  moji = str(i+1)
  if not moji[0]+moji[-1] in f_dict:
    f_dict[moji[0]+moji[-1]] = 1
  else:
    f_dict[moji[0]+moji[-1]] += 1 
  if not moji[-1]+moji[0] in s_dict:
    s_dict[moji[-1]+moji[0]] = 1
  else:
    s_dict[moji[-1]+moji[0]] += 1
for mykey in f_dict.keys():
  if mykey in s_dict:
      cnt_all += f_dict[mykey] * s_dict[mykey]
print(cnt_all)
#全体に同じものを足すときは累積和を考えたい

N,Q = map(int,input().split())
AB = [list(map(int,input().split())) for _ in range(N-1)]
PX = [list(map(int,input().split())) for _ in range(Q)]

graph = [set([]) for _ in range(N+1)]
for a,b in AB:
    graph[a].add(b)
    graph[b].add(a)
#どちらが親か分からないがとりあえずつながっている
#どちらが親かは後で判断

counter = [0 for _ in range(N+1)]
#counter[i]:i番目の頂点のカウンター
check = [False for _ in range(N+1)]
check[1] = True
#check[i]:i番目の頂点を発見した
#check[i] == True and i in graph[j]ならiはjの親

for p,x in PX:
    counter[p] += x

def cal(graph,counter,edge,parent):
    for e in (graph[edge]-parent):
        counter[e] += counter[edge]
        cal(graph,counter,e,set([edge]))
    check[edge] = True

cal(graph,counter,1,set())

ans = " ".join(map(str,counter[1:]))
print(ans)


### FIXED CODE ###

#全体に同じものを足すときは累積和を考えたい

N,Q = map(int,input().split())
AB = [list(map(int,input().split())) for _ in range(N-1)]
PX = [list(map(int,input().split())) for _ in range(Q)]

graph = [[] for _ in range(N+1)]

for a,b in AB:
    graph[a].append(b)
    graph[b].append(a)
#どちらが親か分からないがとりあえずつながっている
#どちらが親かは後で判断

counter = [0 for _ in range(N+1)]
#counter[i]:i番目の頂点のカウンター
parent = [None for _ in range(N+1)]

for p,x in PX:
    counter[p] += x

def dfs(graph,counter,edge):
    stk = []
    stk.append(edge)
    while len(stk) > 0:
        p = stk.pop()
        for e in graph[p]:
            if parent[p] == e:
                continue
            else:
                parent[e] = p
                counter[e] += counter[p]
                stk.append(e)

dfs(graph,counter,1)

ans = " ".join(map(str,counter[1:]))
print(ans)
from heapq import heappush,heappop 
from math import sqrt
inf=float("inf")

xs,ys,xt,yt=map(int,input().split())
n=int(input())

q=[]
l=[(xs,ys,0),(xt,yt,0)]+[tuple(map(int,input().split())) for _ in range(n)]

sizeV=len(l)
rests={*range(sizeV)}
cost=[inf]*sizeV
cost[0]=0
heappush(q,(0,0))

while q:
  c1,i=heappop(q)
  if c1>cost[i]:continue

  rests.remove(i)
  xi,yi,ri=l[i]
  for j in rests:
    xj,yj,rj=l[j]
    d=max(0,sqrt((xj-xi)**2+(yj-yi)**2)-ri-rj)
    c2=c1+d
    if c2<cost[j]:
      cost[j]=c2
      heappush(q,(c2,j))

print(cost[1])

### FIXED CODE ###

from heapq import heappush,heappop 
from math import sqrt
inf=float("inf")

xs,ys,xt,yt=map(int,input().split())
n=int(input())

q=[]
l=[(xs,ys,0),(xt,yt,0)]+[tuple(map(int,input().split())) for _ in range(n)]

sizeV=len(l)
rests=set(range(sizeV))
cost=[inf]*sizeV
cost[0]=0
heappush(q,(0,0))

while q:
  c1,i=heappop(q)
  if c1>cost[i]:continue

  rests.remove(i)
  if not rests:break

  xi,yi,ri=l[i]
  for j in rests:
    xj,yj,rj=l[j]
    d=max(0.0,sqrt((xj-xi)**2+(yj-yi)**2)-ri-rj)
    c2=c1+d
    if c2<cost[j]:
      cost[j]=c2
      heappush(q,(c2,j))

print(cost[1])
x1, y1, x2, y2 = map(float, input().split())
import math
print("{0.8}".format(math.sqrt(x1*x2 + y1*y2)))

### FIXED CODE ###

x1, y1, x2, y2 = map(float, input().split())
import math
ans = math.sqrt((x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2))
print("{0:.8f}".format(ans))
import functools
import math

N,X = map(int,input().rstrip().split())


x = list(map(int,input().rstrip().split()))
x.append(X)

to = []
for i in range(len(x)-1):
	to.append(x[i+1] - x[i])

gcd = functools.reduce(math.gcd, to)
print(gcd)

### FIXED CODE ###

import numpy as np
import fractions
from functools import reduce
N,X = map(int,input().rstrip().split())
x = []
x = list(map(int,input().rstrip().split()))
x.append(X)
x.sort()


mini = []
for i in range(len(x)-1):
	mini.append(x[i+1] - x[i])
print(reduce(fractions.gcd, mini))
import sys
sys.setrecursionlimit(20000)
def func(c,x):
    c[x][0] = 1
    for i in c[x][1:]:
        if c[i][0] == 0:
            func(c,i)
    return c

# 入力
N,M = map(int,input().split())
XYZ = list(list(map(int,input().split()))for i in range(M))
############################################
card = [[0]for i in range(N)]
set = 0
############################################
# グラフを描く
for x,y,z in XYZ:
    card[x-1].append(y-1)
    card[y-1].append(x-1)
############################################
for i in range(N):
    if card[i][0] == 0:
        set += 1
        card = func(card,i)
############################################
print(set)

### FIXED CODE ###

import sys
sys.setrecursionlimit(2000000)
def func(c,x):
    c[x][0] = 1
    for i in c[x][1:]:
        if c[i][0] == 0:
            func(c,i)
    return c

# 入力
N,M = map(int,input().split())
XYZ = list(list(map(int,input().split()))for i in range(M))
############################################
card = [[0]for i in range(N)]
set = 0
############################################
# グラフを描く
for x,y,z in XYZ:
    card[x-1].append(y-1)
    card[y-1].append(x-1)
############################################
for i in range(N):
    if card[i][0] == 0:
        set += 1
        card = func(card,i)
############################################
print(set)
import sys

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

array = [[int(x) for x in input().split()] for x in range(m)]

if m == 0:
    print(0)
    sys.exit()

adj_array = [[] for x in range(m + 1)]
res_array = [True] + [False for x in range(n)]
for item in array:
    adj_array[item[0]].append(item[1])
    adj_array[item[1]].append(item[0])


def dfs(n, res_array, res):
    res_array[n] = True
    if False not in res_array:
        return res+1
    else:
        for next in adj_array[n]:
            if not res_array[next]:
                res = dfs(next, list(res_array), res)
    return res


res = 0
res_array[1] = True
print(dfs(1, res_array, res))


### FIXED CODE ###

import sys

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

array = [[int(x) for x in input().split()] for x in range(m)]

if m == 0:
    print(0)
    sys.exit()

adj_array = [[] for x in range(n + 1)]
res_array = [True] + [False for x in range(n)]
for item in array:
    adj_array[item[0]].append(item[1])
    adj_array[item[1]].append(item[0])


def dfs(n, res_array, res):
    res_array[n] = True
    if False not in res_array:
        return res+1
    else:
        for next in adj_array[n]:
            if not res_array[next]:
                res = dfs(next, list(res_array), res)
    return res


res = 0
res_array[1] = True
print(dfs(1, res_array, res))
def input():
    import sys
    return sys.stdin.readline().rstrip()


def main():
    import math
    import collections
    import itertools

    h, w = map(int, input().split())
    
    ss = ['.' * w] + ['.' + input() + '.' for _ in range(h)] + ['.' * w]

    for i in range(1, h + 1):
        for j in range(1, w + 1):
            if ss[i][j] == '#':
                if ss[i + 1][j] == '.' and ss[i - 1][j] == '.' and ss[i][j + 1] == '.' and ss[i][j - 1] == '.':
                    print("No")
                    break
        else:
            continue
        break
    else:
        print("Yes")



if __name__ == '__main__':
    main()

### FIXED CODE ###

def input():
    import sys
    return sys.stdin.readline().rstrip()


def main():
    import math
    import collections
    import itertools

    h, w = map(int, input().split())
    
    ss = ['.' * (w + 2)] + ['.' + input() + '.' for _ in range(h)] + ['.' * (w + 2)]

    for i in range(1, h + 1):
        for j in range(1, w + 1):
            if ss[i][j] == '#':
                if ss[i + 1][j] == '.' and ss[i - 1][j] == '.' and ss[i][j + 1] == '.' and ss[i][j - 1] == '.':
                    print("No")
                    break
        else:
            continue
        break
    else:
        print("Yes")



if __name__ == '__main__':
    main()
a, b = map(int, input().split())
 if (abs(a)+abs(b))%2 == 0:
     print(int((abs(a) + abs(b))/2))
 else:
     print("IMPOSSIBLE")

### FIXED CODE ###

a, b = map(int, input().split())
if (abs(a)+abs(b))%2 == 0:
    print(int((abs(a) + abs(b))/2))
else:
    print("IMPOSSIBLE")