peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
N = int(input())
A = list(map(int,input().split()))
if N==2: print(max(A));exit()
from math import gcd
L = {}
R = {}
L[0] = A[0]
R[N-1] = A[-1]
ans = 0
for i in range(1,N):
    L[i] = gcd(L[i-1],A[i])
    R[N-i-1] = gcd(R[N-i],A[N-i-1])
for i in range(2,N):
    ans = max(ans,gcd(L[i-2],R[i]))
ans = max(ans,R[1])
ans = max(ans,L[N-1])
print(ans)
# Judge status: Accepted
A,B=map(int, input().split())
if A <= 5:
    print(0)
elif A <= 12:
    print(B//2)
else:
    print(B)
# Judge status: Accepted
x = input()
if x.isupper():
    print('A')
else:
    print('a')
# Judge status: Wrong Answer
k = list(map(int,input().split()))
print(int(360//k[0]))
# Judge status: Wrong Answer
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

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

if __name__ == '__main__':
    a = [int(i) for i in input().split()]

    if a[0] >999:
        print("ABD"+str(a[0]-999))
    else:
        print("ABC"+str(a[0]))
# Judge status: Accepted
s=input()
if s[-1]=="s":
  print(s+"es")
else:
  print(s+"s")
# Judge status: Accepted
N = int(input())

power = 1
for i in range(1, N+1):
  power = power * i % (10 ** 9 + 7)

print(power)
# Judge status: Accepted
n, m, x, y = list(map(int, input().split()))

p = list(map(int, input().split()))
q = list(map(int, input().split()))

if max(max(p), x) < min(min(q), y):
    print("No War")
else:
    print("War")
# Judge status: Wrong Answer
n = int(input())
k = int(input())
x = int(input())
y = int(input())
print((k * x) + ((n - k) * y))
# Judge status: Accepted
x=int(input())
q=x//11
r=x%11
if r==0:
  print(2*q)
elif 0<r<=6:
  print(2*q+1)
else:
  print(2*q+2)
# Judge status: Wrong Answer
def main():
    x, a, b = map(int, input().split())
    if a > b:
        print("delicious")
    elif b - a <= x:
        print("safe")
    else:
        print("dangerous")


if __name__ == '__main__':
    main()
# Judge status: Accepted
n, m = map(int, input().split())
answer = -1, -1, -1

for x in range(n+1):
  for y in range(n-x+1):
    z = n - x - y
    if x * 10000 + y * 5000 + z * 1000 == m:
      answer = (x, y, z)
      break
    else:
      continue
print(*answer)
# Judge status: Wrong Answer
N=int(input())
A=list(map(int,input().split()))

ans=[None]*N
for i in range(N):
    ans[i]=A.index(i+1)+1
print(ans)
# Judge status: Wrong Answer
N,X,T=list(map(int,input().split()))
S=N//X
print(S*T+T)
# Judge status: Accepted
N=int(input())
S=input()
L=[0]*N
R=[0]*N
Lcnt=0
Rcnt=0
for i in range(1,N):
    if(S[i-1]=='W'):
        Lcnt+=1
    L[i]=Lcnt
for i in reversed(range(0,N-1)):
    if(S[i+1]=='E'):
        Rcnt+=1
    R[i]=Rcnt
        
ans=10e+9
for i in range(N):
    ans=min(ans,(L[i]+R[i]))
    
print(ans)
# Judge status: Wrong Answer
n = int(input())
ans = 0
a = [[[] for i in range(10)] for j in range(10)]
for i in range(n):
    a[int(str(i)[0])][int(str(i)[-1])].append(i)

for i in range(1, 10):
    for j in range(1, 10):
        ans += len(a[i][j]) * len(a[j][i])

print(ans)
# Judge status: Accepted
n=int(input()) 
c=list(map(int, input().split()))
s = sum(c)
l = []
x = 0
y = s

for i in c[:n-1]:
    x += i
    y -= i
    l += [abs(x-y)]
print(min(l))
# Judge status: Wrong Answer
a,b,x = map(int,input().split())

if x>b:
    print(0)
else:
    if b%x==0:
        tmp = 1
    else:
        tmp = 0
    print((b-a)//x+tmp)
# Judge status: Accepted
n, m = map(int, input().split())
ab = sorted([tuple(map(int, input().split())) for _ in range(n)])

i = 0 # 今何本かったか
price = 0 # 合計いくらか
for a, b in ab:
    price += a * min(b, m-i)
    i += min(b, m-i)
    if i == m:
        print(price)
        exit()
# Judge status: Wrong Answer
import re

S=input()
ans = sorted((re.findall("[AGCT]*", S)), reverse=True, key=len)
print(ans[0])
# Judge status: Wrong Answer
n = int(input())
s = input()
t = input()

for i in range(n, -1, -1):
    ans = [""] * (n + n - i)
    ans[:n] = list(s)
    ans[-n:] = list(t)
    if ans[:n] == list(s):
        break

print(*ans, sep="")
# Judge status: Wrong Answer
n, k = map(int, input().split())
i = 1
while k ** i < n:
    i += 1
print(i+1)
# Judge status: Accepted
n = int(input())
a = [int(x) for x in input().split()]

a.sort(reverse=True)

print(sum(a[1:2*n:2]))
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))
ans = 0
a.sort()
for i in range(1, n):
    ans += a[n - i // 2 - 1]
print(ans)
# Judge status: Accepted
n = int(input())

dic = {}
for i in range(n):
  s = ''.join(sorted(list(input())))
  if not s in dic:
    dic[s] = 1
  else:
    dic[s] += 1

res = 0
for v in dic.values():
  if v >= 2:
    res += v*(v-1)
print(res//2)
# Judge status: Accepted
s = input()
a = []

for i in range(3,len(s)+1):
	a.append(s[i-3:i])

min = 1000

for i in a:
	if min > abs(753 - int(i)):
		min = abs(753 - int(i))

print(min)
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))

ans = 0
for i in range(n):
    if (i + 1) % 2 == 1:
        if a[i] % 2 == 1:
            ans += 1
print(ans)
# Judge status: Accepted
n, *a = map(int, open(0))
done = [0] * n
b = 1
cnt = 0
while not done[b - 1]:
    if b == 2:
        print(cnt)
        exit()
    done[b - 1] = 1
    b = a[b - 1]
    cnt += 1
print(-1)
# Judge status: Accepted
import sys
from fractions import gcd
input = sys.stdin.readline
N = int(input())
a = list(map(int, input().split()))
mod = 10 ** 9 + 7
l = 1
res = 0
for x in a:
  l = x * l // gcd(x, l)
l %= mod
for x in a:
  res += l * pow(x, mod - 2, mod)
  res %= mod
print(res)
# Judge status: Wrong Answer
n,m = map(int,input().split())
arr = list(map(int,input().split()))
arr.sort()
M = round(sum(arr)/(2*m))
cnt = 0
for i in range(n):
  if arr[i] >= M:
    cnt+=1
    
if cnt == m or cnt > m:
  print('Yes')
else:
  print('No')
# Judge status: Wrong Answer
N = int(input())
# X, L = [], []
A = []
for i in range(N):
    x, l = map(int, input().split())
    # X.append(x)
    # L.append(l)
    A.append((x - l, x + l))

A.sort()
ans = 0
x = -10e50
for i in range(N):
    l, r = A[i]
    if x <= l:
        ans += 1
        x = r-1

print(ans)


# 選べるロボットの中で最もX+Lが小さいもの
# Judge status: Accepted
n,p=map(int,input().split())
A=[int(a)%2 for a in input().split()]
odd=sum(A)
if odd==0:
    if p==1:print(0)
    else:print(2**n)
else:print(2**(n-1))
# Judge status: Accepted
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
n=int(input().rstrip())
cnt=0
tmp=0
for i in range(n):
    a,b=map(int,input().split())
    if a==b:
        tmp+=1
    else:
        cnt=max(cnt,tmp)
        tmp=0
cnt=max(cnt,tmp)

if cnt>=3:
    print("Yes")
else:print("No")
# Judge status: Accepted
from fractions import gcd
a, b = map(int, input().split())
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
print(len(set(prime_factorize(gcd(a, b)))) + 1)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
ans = 9999
x = 0
Sum = 0
for i in range(n):
    Sum += a[i]
for i in range(n):
    x += a[i]
    y = Sum - a[i]
    if i+1 < n:
        ans = min(ans, abs(x-y))
print(abs(ans))
# Judge status: Accepted
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

x = int(input())

def cond(x):
    q, r = x // 100, x % 100
    q5, r5 = r // 5, r % 5
    if r5 == 0:
        return q >= q5
    else:
        return q >= q5 + 1

if cond(x):
    print(1)
else:
    print(0)
# Judge status: Wrong Answer
#!/usr/bin/env python3


def main():
    a = int(input())
    print(a+a^2+a^3)


if __name__ == '__main__':
    main()
# Judge status: Accepted
n=int(input())
s=input()
a=[0]
for i in s:
    if i==".":a+=[a[-1]+1]
    else:a+=[a[-1]]
w=s.count(".")
print(min(i-a[i]+w-a[i] for i in range(n+1)))
# Judge status: Accepted
K, A, B = map(int, input().split())

if B - A <= 2 or A + 1 > K:
    print(K + 1)
    exit()

K -= A - 1
res = A

res += (B - A) * (K // 2)

if K % 2 == 1:
    res += 1

print(res)
# Judge status: Wrong Answer
import sys
import collections

n = int(input())
a = collections.Counter(list(map(int, sys.stdin.readline().split())))
chk = []
for i in a:
    if a[i] >= 2:
        chk.append([i, a[i]])
if len(chk) < 1:
    print(0)
else:
    if chk[0][1] >= 4:
        print(chk[-1][0]*chk[-1][0])
        exit()
    print(chk[-1][0]*chk[-2][0])
# Judge status: Wrong Answer
n,m=map(int,input().split())
a=[list(input()) for _ in range(n)]
b=[list(input()) for _ in range(m)]
x=0
for i in range(n-m):
    for j in range(n-m):
        for k in range(m):
            if a[i][j]==b[k][0]:
                for l in range(m):
                    if a[i][j+l]==b[k][l]:x+=1
if x==m:print('Yes')
else:print('No')
# Judge status: Wrong Answer
a,b = map(int,input().split())
s = list(input())
if "-" not in s:
    print("No")
elif a==len(s[:s.index("-")]) and b==len(s[s.index("-")+1:]):
    print("Yes")
else:print("No")
# Judge status: Accepted
input_line = int(input())

result = 2 * input_line * 3.14
print(result)
# Judge status: Accepted
D = int(input())
C = list(map(int, input().split()))
#  S = [[1st day], [2nd day],  ..., [D-th day]]
S = []
for i in range(D):
    Si = list(map(int, input().split()))
    S.append(Si)
I = 26

last = [0]*I

score = S[1]
contest = score.index(max(score))

last = [x+1 for x in last]
last[contest] = 0

print(contest + 1)

for day in range(1, D):
    score = [(last[i]*C[i])*I+S[day][i] for i in range(I)]
    contest = score.index(max(score))

    last = [x+1 for x in last]
    last[contest] = 0

    print(contest + 1)
# Judge status: Accepted
N, x = map(int, input().split())
a = list(map(int, input().split()))

a.sort()

res = 0

for aa in a:
    x -= aa
    if x < 0:
        print(res)
        exit()
    res += 1

if x == 0:
    print(N)
else:
    print(N - 1)
# Judge status: Accepted
n = int(input())

p = 1
mod = 10**9 + 7
for i in range(1,n+1):
	p *=  i
	p %= mod

print(p)
# Judge status: Accepted
a,b=map(int,input().split())
x=(a+b)/2
if x.is_integer():
    print(int(x))
else:
    print("IMPOSSIBLE")
# Judge status: Accepted
N = int(input())
A_list = list(map(int,input().split()))
output = 1
flug = 0

if 0 in A_list:
    print(0)
    flug = 1
if flug != 1:
    for i in range(N):
        output *= A_list[i]
        
        if (output > 10 ** 18):
            print(-1)
            flug = 1
            break
if(flug != 1):
    print(output)
# Judge status: Accepted
A,B = map(int,input().split())
print(1-(A-B)//(A-1))
# Judge status: Accepted
# https://atcoder.jp/contests/abc109/tasks/abc109_b

n = int(input())

words = []
for _ in range(n):
    words.append(input())

pre = words[0]
done = set([pre])
for i in range(1, n):
    w = words[i]
    if pre[-1] == w[0] and w not in done:
        pre = w
        done.add(w)
    else:
        print('No')
        break
else:
    print('Yes')
# Judge status: Wrong Answer
if __name__== '__main__':
  s = input('>>')
  if s[0] == 'A' and s[1] == 'A' and s[2] == 'A':
        	print('Yes')
  elif s[0] == 'B' and s[1] == 'B' and s[2] == 'B':
      		print('Yes')
  else:
        	print('No')
# Judge status: Accepted
n = int(input())
num = list(map(int, input().split()))

count = 0
for i in range(1,n-1):
  num1 = num[i-1:i+2]
  num2 = sorted(num1)
  if num2[1]==num1[1]: count += 1
    
print(count)
# Judge status: Accepted
#coding UTf-8
a,b,c,d = (int(x) for x in input().split())
while True:
  c=c-b;
  if c<=0:
        print("Yes")
        break;
  a=a-d;
  if a<=0:
        print("No")
        break;
# Judge status: Wrong Answer
x,y,z=map(int,input().split())
temp=x
y=x
x=temp
 
temp2=z
z=x
x=temp2
print(x,y,z)
# Judge status: Accepted
from collections import defaultdict
from heapq import heappush, heappop, merge

n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(n)]

day = defaultdict(list)
for a, b in ab:
    day[a].append(b)

work, ans = [], 0
for i in range(1, m + 1):
    for j in day[i]:
        heappush(work, -j)
    if len(work) > 0:
        ans -= heappop(work)
print(ans)
# Judge status: Accepted
import collections
N = int(input())
s = [input() for _ in range(N)]
M = int(input())
t = [input() for _ in range(M)]

s_counter = collections.Counter(s)
t_counter = collections.Counter(t)

ans = 0
for i in s_counter:
    ans = max(ans, s_counter[i] - t_counter[i])
print(ans)
# Judge status: Accepted
N, M = map(int, input().split())

if N == M:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
a,b=map(int,input().split())
if a>b:
  print(a-1)
else:
  print(a)
# Judge status: Wrong Answer
N, K = map(int, input().split())
p = list(map(int, input().split()))

s = 0

for j in range(K):
  s += p[j]
  
x = s

for k in range(N - K):
  t = s - p[k] + p[K + k]
  if s <= t:
    x = t
  else:
    pass
  s = t

print((x + K) / 2)
# Judge status: Accepted
n=int(input())
print(sum(map(lambda x:n//x*(n//x+1)//2*x,range(1,n+1))))
# Judge status: Accepted
from collections import Counter
n = int(input())
dic = Counter(list(map(int,input().split())))
ans = 0

for k,v in dic.items():
    if k > v:
        ans += v
    elif k < v:
        ans += v-k
    else:
        pass
print(ans)
# Judge status: Accepted
import sys
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]

A, B, C, K = ri_()
print(A - B if K % 2 == 0 else B - A)
# Judge status: Wrong Answer
a,b,c = map(int,input().split())
ans = 'No'
 
for i in range(b):
  if (a*i)%b == c:
    ans = 'Yes'
    break
    
print(ans)
# Judge status: Accepted
N = int(input())
[*h] = map(int, input().split())
dp = [float('inf') for _ in range(N)]
dp[0] = 0
dp[1] = abs(h[0]-h[1])
for i in range(2, N):
    dp[i] = min(dp[i-1]+abs(h[i]-h[i-1]), dp[i-2]+abs(h[i]-h[i-2]))

print(dp[N-1])
# Judge status: Accepted
a, b = (int(i) for i in input().split())
print(b//2+a)
# Judge status: Accepted
N,M,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
x.append(X)
y.append(Y)
x.sort()
y.sort()
if x[-1] >= y[0]:
    print("War")
else:
    print("No War")
# Judge status: Accepted
N,K=list(map(int,input(' ').split(' ')))
print(min(N%K,(-N)%K))
# Judge status: Accepted
x,y=(map(int,input().split()))

import sys
for a in range(x+1):
    if 2*a+4*(x-a)==y:
        print('Yes')
        sys.exit()

print('No')
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
  a[i]-=i
a.sort()
b=(a[n//2]+a[(n-1)//2])//2
print(sum(abs(i-b) for i in a))
# Judge status: Accepted
n,m=map(int,input().split())
a=list(map(int,input().split()))
a_sum=sum(a)
count=0
for i in a:
    if i>=a_sum/(4*m):
        count+=1
if count>=m:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
# 131 B

n, l = map(int, input().split())
cmin = float('inf')
sum = 0

for i in range(1, n+1):
    f = l + i - 1
    sum += f
    if f >= 0:
        cmin = min(cmin, f)
    else:
        cmin = max(cmin, f)

print(sum - cmin)
# Judge status: Wrong Answer
a, b = map(int, input().split())

count = 0
for i in range(a, b):
    str_i = str(i)
    if str_i[0] == str_i[4] and str_i[1] == str_i[3]:
        count += 1
print(count)
# Judge status: Accepted
x = int(input())
y = x
while y % 360:
    y += x
print(y//x)
# Judge status: Accepted
money = int(input())

count = 0
x = 100

while True:
  x = int(x + x * 0.01)
  count = count + 1
  
  if x >= money:
    break
    
print(count)
# Judge status: Accepted
X, Y, Z = map(int, input().split())
X, Y = Y, X
X, Z = Z, X
print(X, Y, Z)
# Judge status: Wrong Answer
N = int(input())

ans = N*(N-1)/2
print(int(ans))
# Judge status: Accepted
# B - 文字列大好きいろはちゃんイージー
# https://atcoder.jp/contests/abc042/tasks/abc042_b

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

S.sort()

print("".join(S))
# Judge status: Wrong Answer
x, y, z = map(int,input().split())

if x%y == 0 and z != 0:
    print("NO")
else:
    print("YES")
# Judge status: Wrong Answer


import heapq

n,m=map(int,input().split())
a=list(map(int,input().split()))
b=[-int(i) for i in a]

heapq.heapify(b)

for i in range(m):
    x=heapq.heappop(b)//2
    heapq.heappush(b,x)

print(-sum(b))
# Judge status: Wrong Answer
N, X = map(int, input().split())
x = list(map(int, input().split()))
x.append(X)
x.sort()

a = [None] * N
for i in range(1, N+1):
    a[i-1] = x[i] - x[i-1]

mn = min(a)

for m in a:
    if m % mn != 0:
        print(1)
        break
else:
    print(mn)
# Judge status: Accepted
from fractions import*
from functools import*
M=10**9+7
_,a=open(0)
*a,=map(int,a.split())
s=reduce(lambda x,y:x//gcd(x,y)*y,a)%M
c=0
for i in a:
    c+=s*pow(i,M-2,M)
    c%=M
print(c)
# Judge status: Wrong Answer
n, a, b = map(int, input().split())
s = input()
ca, cb = 0, 0
for i in s:
    if i == 'c':
        print('No')
    elif i == 'a' and (ca+cb) < (a+b):
        ca += 1
        print('Yes', 'ca =', ca, 't =',ca+cb)
    elif (i == 'b' and (ca+cb) < (a+b) and cb < b):
        cb += 1
        print('Yes', 'cb =', cb, 't =',ca+cb)
    else:
        print('No')
# Judge status: Accepted
A = [int(input()) for i in range(6)]

if A[4] - A[0] > A[5]:
    print(":(")
else:
    print("Yay!")
# Judge status: Accepted
s = input()
ans = ''
for si in s:
  if si == 'B':
    if ans == '':
      continue
    else:
      ans = ans[:-1]
  else:
    ans += si
print(ans)
# Judge status: Accepted
n,*ti = [int(input()) for _ in range(6)]
import math
print(4 + math.ceil(n/min(ti)))
# Judge status: Accepted
n = int(input())
s = input()
w = [0]*(n + 2)
e = [0]*(n + 2)
ans = 100000000

for i in range(1, n + 1):
    w[i] += w[i - 1]
    e[-i - 1] += e[-i]
    if s[i - 1] == "W":
        w[i] += 1
    if s[-i] == "E":
        e[-i - 1] += 1

for i in range(1, n + 1):
    ref = e[i + 1]
    ref += w[i - 1]
    ans = min(ans, ref)

print(ans)
# Judge status: Wrong Answer
a = int(input())
print(3.14159265 * a *a)
# Judge status: Accepted
N, M = map(int, input().split())
ans = 0
for i in range(1, int(M**0.5)+1):
    if M % i == 0:
        if i * N <= M:
            ans = max(ans, i)
        if (M // i) * N <= M:
            ans = max(ans, M // i)
print(ans)
# Judge status: Wrong Answer
n,k = map(int,input().split())
A = list(map(int,input().split()))
ans = 0
for a in A:
  if a > k:
    ans += 1
print(ans)
# Judge status: Wrong Answer
n = int(input())

mn = 10**10
for a in range(1, n // 2):
    mn = min(mn, sum(int(i) for i in str(a)) + sum(int(i) for i in str(n-a)))
print(mn)
# Judge status: Accepted
n = int(input())
s = input()
x = 0
l = 0

for i in range(n):
    if s[i] == 'I':
        x += 1
    else:
        x -= 1
    l = max(l,x)

print(l)
# Judge status: Wrong Answer
import math

N, K = map(int, input().split())
A = list(input().split())
A_lis = [int(A[i]) for i in range(N)]
index = A_lis.index(1)

if N == K:
    print(1)
else:
    left = math.ceil(index / (K-1))
    leftamari = index % (K-1)
    right = math.ceil(max(0, N - K - index + leftamari) / (K-1))
    print(left + right)
# Judge status: Accepted
from math import factorial

def com(n, r):
    return fac_n // factorial(r) // factorial(n - r)


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

odd, even = 0, 0
for i in range(N):
    if A[i] % 2 == 1:
        odd += 1
    else:
        even += 1

fac_n = factorial(odd)

res = 0
for r in range(P, odd+1, 2):
    res += com(odd, r)
ans = res * (2**even)

print(ans)
# Judge status: Accepted
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    A, B, C, K = [int(x) for x in input().split()]

    ans = A - B
    if K % 2 == 0:
        print(ans)
    else:
        print(-ans)


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
#!usr/bin/env python3
import sys
import math
import string
import collections
import fractions
import random
from operator import itemgetter
import itertools
from collections import deque
import copy
import heapq
import bisect

MOD = 10 ** 9 + 7
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

sys.setrecursionlimit(10 ** 8)

N = int(input())
check = [0]*(N+1)
A = [int(input()) for _ in range(N)]
LIS = [INF]*(N+1)
for i in range(N):
    temp = bisect.bisect_left(LIS, A[i])
    check[temp] += 1
    LIS[temp] = A[i]
print(max(check))
# Judge status: Accepted
a = 'abcdefghijklmnopqrstuvwxyz'
c = input()
print(a[a.index(c)+1])
# Judge status: Accepted
a, b = list(map(int, input().split()))

if a > 0:
    ans = 'Positive'
elif a <= 0 and b >= 0:
    ans = 'Zero'
else:
    neg = b - a + 1
    if neg % 2 == 0:
        ans = 'Positive'
    else:
        ans = 'Negative'

print(ans)
# Judge status: Wrong Answer
n,m = map(int,input().split())

if n >= 2 and m >= 2:
    print((n-2)*(m-2))
elif n == 1:
    print(m-2)
else:
    print(n-2)
# Judge status: Wrong Answer
N = int(input())
A = list(map(int, input().split()))
ex = list(range(1, N + 1))
is_good = 0
for i in range(N):
  if A[i] == ex[i]:
    is_good += 1
print(-1 if is_good == 0 else N - is_good)
# Judge status: Wrong Answer
import random
S = input()
i=random.randint(0,len(S)-3)
print(S[i:i+2])
# Judge status: Accepted

N = input()

if "7" in N:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
from math import gcd
N, M = map(int, input().split())
A = list(map(int, input().split()))
lcm = 1
for a in A:
    lcm = lcm * a // gcd(lcm, a)
    if lcm > M*2:
        print(0)
        exit()
for a in A:
    if lcm // a % 2 == 0:
        print(0)
        exit()
ans = M // (lcm//2) - M // lcm
print(ans)
# Judge status: Accepted
h,n=map(int,input().split())
inf=100000000000
dp=[inf]*(h+1)
dp[h]=0
for i in range(n):
    a,b=map(int,input().split())
    for j in range(h,-1,-1):
        dp[max(j-a,0)]=min(dp[max(j-a,0)],dp[j]+b)
print(dp[0])
# Judge status: Accepted
a = int(input())
b = int(input())
c = int(input())
y = int(input())
 
ans = 0
 
for ai in range(a+1):
    for bi in range(b+1):
        for ci in range(c+1):
            amount = 500 * ai + 100 * bi + 50 * ci
            if amount == y:
                ans += 1
 
print(ans)
# Judge status: Accepted
x=int(input())
count=0
a=x//11
b=x-a*11
if b==0:
    print(a*2)
elif b>=1 and b<=6:
    print(a*2+1)
else:
    print(a*2+2)
# Judge status: Accepted
N = int(input())
L = []
for _ in range(5):
    L.append(int(input()))

mn = min(L)
ans = (-(-N//mn)) + 4
print(ans)
# Judge status: Accepted
N=input()
l=753
sa=999999999999
for i in range(len(N)-2):
  k=int(N[i]+N[i+1]+N[i+2])
  #print(k)
  if abs(k-l)<sa: sa=abs(k-l)
print(sa)
# Judge status: Wrong Answer
x,y = map(int,input().split())
ch = max(abs(x),abs(y)) - min(abs(x),abs(y))
if x <= 0 and y == 0:
    print(ch)
elif x*y <= 0:
    print(ch+1)
elif x*y >= 0 and x >= y:
    print(ch+2)
else:
    print(ch)
# Judge status: Wrong Answer
K,N=map(int,input().split())
A=list(map(int,input().split()))
for i in range(1,N):
  L=0
  L=max(L,A[i]-A[i-1])
L=max(L,K-A[-1]+A[0])
print(K-L)
# Judge status: Wrong Answer
from sys import stdin,stdout
INT_MAX= 100000000
n,k=map(int,stdin.readline().split())
dp  = [INT_MAX]*(n)
h=[int(X) for X in stdin.readline().split()]
dp[0]=0
dp[1]=abs(h[1]-h[0])
for i in range(2,n):
    p=1
    while(p<k+1 and i-p>=0):
        dp[i]= min(dp[i-p+1]+abs(h[i-p+1]-h[i]),dp[i])
        p+=1
stdout.write(str(dp[n-1])+"\n")
# Judge status: Accepted
x, y, z= input().split()
w=z
z=y
y=x
x=w
print(x, y, z)
# Judge status: Accepted
import sys

input = sys.stdin.readline

A = int(input())
B = int(input())
ans = [1,2,3]

for value in ans:
    if A == value or B == value:
        continue
    else:
        print(value)
# Judge status: Accepted
from collections import deque
N,M = map(int,input().split())

adj = [list() for _ in range(N)]

for _ in range(M):
    a,b = map(int,input().split())
    adj[a-1].append(b-1)
    adj[b-1].append(a-1)

parent = [None]*N
queue = deque([0])
while queue:
    u = queue.popleft()
    for v in adj[u]:
        if parent[v] is None:
            parent[v] = u
            queue.append(v)

print('Yes')
print(*(x+1 for x in parent[1:]), sep='\n')
# Judge status: Wrong Answer
N,K=map(int, input().split()) 
for i in range(9999):
    if K**i<=N<=K**(i+1):
        print(i+1)