Harryxun/stf_run huggingface dataset:
X,Y =map(int, input().split())

if (X>=Y or Y%2 or Y>4*X or Y<2*X):
  print('No')
elif(Y<=4*X and Y>=2*X)
  print('Yes')


### FIXED CODE ###

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

if (X>=Y or Y%2 or Y>4*X or Y<2*X):
  print('No')
elif(Y<=4*X and Y>=2*X):
  print('Yes')
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 12 07:49:36 2020

@author: naoki
"""
N = int(input())
xl = [list(map(int, input())) for _ in range(N)]

left_right = [[row[0]-row[1], row[0]+row[1]] for row in xl]
left_right = sorted(left_right, key = lambda x:int(x[1]))
count = 0
now = -10000
for row in (left_right):
    if row[0] < now:
        continue
    else:
        count += 1
        now = row[1]
print(count)


### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Sun Apr 12 07:49:36 2020

@author: naoki
"""
N = int(input())
xl = [list(map(int, input().split())) for _ in range(N)]

left_right = [[row[0]-row[1], row[0]+row[1]] for row in xl]
left_right = sorted(left_right, key = lambda x:int(x[1]))
count = 0
now = -100000000000
for row in (left_right):
    if row[0] < now:
        continue
    else:
        count += 1
        now = row[1]
print(count)
import itertools
n,m,x=map(int,input().split())
l=[[0]]*n
ln=[0]*m
kan=0
for i in range(n):
  l[i]=list(map(int,input().split()))
  for j in range(m+1):
    if j==0:
      kan+=l[i][j]
    else:
      ln[j-1]+=l[i][j]
if sorted(ln)[0]<x:
  print(-1)
else:
  mkan=-1
  for i in range(n):
    itr=itertools.combinations(range(n),i)
    for comb in itr:
      kan=0
      ln=[0]*m
      for j in comb:
        kan+=l[int(j)][0]
        for ii in range(m):
          ln[ii]+=l[int(j)][ii+1]
      if sorted(ln)>=x:
        if mkan==-1 or mkan>kan:
          mkan=kan
  print(mkan)

### FIXED CODE ###

import itertools
n,m,x=map(int,input().split())
l=[[0]]*n
ln=[0]*m
kan=0
for i in range(n):
  l[i]=list(map(int,input().split()))
  for j in range(m+1):
    if j==0:
      kan+=l[i][j]
    else:
      ln[j-1]+=l[i][j]
if sorted(ln)[0]<x:
  print(-1)
else:
  mkan=-1
  for i in range(n+1):
    itr=itertools.combinations(range(n),i)
    for comb in itr:
      kan=0
      ln=[0]*m
      for j in comb:
        kan+=l[int(j)][0]
        for ii in range(m):
          ln[ii]+=l[int(j)][ii+1]
      if sorted(ln)[0]>=x:
        if mkan==-1 or mkan>kan:
          mkan=kan
  print(mkan)
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n=int(input())
    A,B=[0]*n,[0]*n
    for i in range(n):
        A[i],B[i]=map(int,input().split())
    A.sort()
    B.sort()
    if n%2==1:
        print(B[n//2]-A[n//2]+1)
    else:
        print(int(((B[n//2-1]+B[n//2])/2-(A[n//2-1]+A[n//2])/2)*2)+1)

if __name__=='__main__':
    main()

### FIXED CODE ###

import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n = int(input())
    A = list(map(int,input().split()))
    ans = 1
    if 0 in A:
        print(0)
        sys.exit()
    for a in A:
        ans *= a
        if ans > 10**18:
            print(-1)
            break
    else:
        print(ans)

if __name__=='__main__':
    main()
def resolve():
    import itertools
    N,M = map(int,input().split())
    N_list = [int(x) for x in range(N)]
    M_list = [int(y) for y in range(M)]

    n = len(list(itertools.combinations(N_list,2)))
    m = len(list(itertools.combinations(M_list,2)))
    print(n+m)

if __name__ == "__main__":
    main()   

### FIXED CODE ###

def resolve():
    import itertools
    N,M = map(int,input().split())
    N_list = [int(x) for x in range(N)]
    M_list = [int(y) for y in range(M)]

    n = len(list(itertools.combinations(N_list,2)))
    m = len(list(itertools.combinations(M_list,2)))
    print(n+m)

resolve()
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10**9)
from collections import deque
from math import ceil

h,w,k=map(int,input().split())
MAP=[]
for i in range(h):
    s=list(input().strip())
    for j,t in enumerate(s):
        if t=='S':
            sx,sy=i,j
    MAP.append(s)
delta=[[1,0],[0,1],[-1,0],[0,-1]]
q=deque()
q.append((sx,sy,k))
dist=float('inf')
Visited=[[False]*w for _ in range(h)]
Visited[sy][sx]=True
while q:
    x,y,t=q.popleft()
    dist=min(dist,x,y,w-1-x,h-1-y)
    if not dist:
        break
    if t:
        t-=1
        for dx,dy in delta:
            if MAP[x+dx][y+dy]=='.' and not Visited[x+dx][y+dy]:
                q.append((x+dx,y+dy,t))
                Visited[x+dx][y+dy]=True
print(1+ceil(dist/k))

### FIXED CODE ###

import sys
input=sys.stdin.readline
sys.setrecursionlimit(10**9)
from collections import deque
from math import ceil

h,w,k=map(int,input().split())
MAP=[]
for i in range(h):
    s=list(input().strip())
    for j,t in enumerate(s):
        if t=='S':
            sx,sy=i,j
    MAP.append(s)
delta=[[1,0],[0,1],[-1,0],[0,-1]]
q=deque()
q.append((sx,sy,k))
dist=float('inf')
Visited=[[False]*w for _ in range(h)]
Visited[sx][sy]=True
while len(q)>0:
    x,y,t=q.popleft()
    dist=min(dist,x,y,h-1-x,w-1-y)
    if dist==0:
        break
    if t>0:
        t-=1
        for dx,dy in delta:
            if MAP[x+dx][y+dy]=='.' and not Visited[x+dx][y+dy]:
                q.append((x+dx,y+dy,t))
                Visited[x+dx][y+dy]=True
print(1+ceil(dist/k))
s = input()
if s = "SSS":
    print(0)
elif s = "RSS" or s = "SRS" or s = "SSR" or s = "RSR":
    print(1)
elif s = "RRR":
    print(3)
elif s = "RRS" or s = "SRR":
    print(2)

### FIXED CODE ###

s = input()
if s == "SSS":
    print(0)
elif s == "RSS" or s == "SRS" or s == "SSR" or s == "RSR":
    print(1)
elif s == "RRR":
    print(3)
elif s == "RRS" or s == "SRR":
    print(2)
def Lgcd(i):
    if i == 0:
        return 0
    if i == 1:
        return a_s[0]
    if i in Lmemo:
        return Lmemo[i]
    re = gcd(Lgcd(i - 1), a_s[i - 1])
    Lmemo[i] = re
    return re


def Rgcd(i):
    if i == n - 1:
        return 0
    if i == n - 2:
        return a_s[-1]
    if i in Rmemo:
        return Rmemo[i]
    re = gcd(Rgcd(i + 1), a_s[i + 1])
    Rmemo[i] = re
    return re


def gcd(a, b):
    if a * b == 0:
        return a + b
    while 1:
        a, b = b, a % b
        if b == 0:
            return a


Lmemo = {}
Rmemo = {}
n = int(input())
a_s = list(map(int, input().split()))
mx = 0
for i in range(n):
    g = gcd(Lgcd(i),Rgcd(i))
    if g > mx:
        mx = g
print(mx)


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)

def Lgcd(i):
    if i == 0:
        return 0
    if i == 1:
        return a_s[0]
    if i in Lmemo:
        return Lmemo[i]
    re = gcd(Lgcd(i - 1), a_s[i - 1])
    Lmemo[i] = re
    return re


def Rgcd(i):
    if i == n - 1:
        return 0
    if i == n - 2:
        return a_s[-1]
    if i in Rmemo:
        return Rmemo[i]
    re = gcd(Rgcd(i + 1), a_s[i + 1])
    Rmemo[i] = re
    return re


def gcd(a, b):
    if a * b == 0:
        return a + b
    while 1:
        a, b = b, a % b
        if b == 0:
            return a


Lmemo = {}
Rmemo = {}
n = int(input())
a_s = list(map(int, input().split()))
mx = 0
for i in range(n):
    g = gcd(Lgcd(i),Rgcd(i))
    if g > mx:
        mx = g
print(mx)
import sys
N,M = map(int,input().split())
source = []
goal = ''
for i in range(M):
  keta,number = map(int,input().split())
  source.append((keta,number))
source.sort()
for i in range(N):
  if i < len(source):
    keta,number = source[i]
    if i == keta-1:
      goal += str(number)
    else:
      goal += '0'
  else:
    goal += '0'
if goal[0] != '0':
	k = int(goal)
elif goal[0] == '0':
  if len(goal) != 1:
    print('-1')
    sys.exit(0)
if len(str(k)) == len(goal):
  print(goal)
else:
  print('-1')

### FIXED CODE ###

import sys
N,M = map(int,input().split())
if (N,M) == (1,0):
    print('0')
    sys.exit(0)
res = ['a' for _ in range(N)]
for i in range(M):
  s,c = map(int,input().split())
  if res[s-1] != 'a' and res[s-1] != str(c):
    print('-1')
    sys.exit(0)
  else:
    res[s-1] = str(c)
for i in range(N):
    if res[i] == 'a':
        if i == 0:
            res[i] = '1'
        else:
            res[i] = '0'
st = ''
for i in range(N):
  st += res[i]
if st[0] == '0' and len(st) > 1:
  print('-1')
  sys.exit(0)
print(st)
def fill0(s,x,y):
	A[y][x] = 0
	if x < W-1 and A[y][x+1] == s: fill0(s,x+1,y)
	if y < H-1 and A[y+1][x] == s: fill0(s,x,y+1)
	if x > 0   and A[y][x-1] == s: fill0(s,x-1,y)
	if y > 0   and A[y-1][x] == s: fill0(s,x,y-1)

while 1:
	H,W = map(int,raw_input().split())
	if H == 0 and W == 0: break
	A = [list(raw_input()) for i in range(H)]
	i = 0
	for y in range(H):
		for x in range(W):
			if A[y][x] in ["#","@","*"]:
				fill0(A[y][x],x,y)
				i += 1
	print i

### FIXED CODE ###

import sys
sys.setrecursionlimit(20000)
def solve(h,w,count,c):
    if 0 <= h < H and 0 <= w < W and A[h][w] == c:
        A[h][w] = count
        for dh,dw in zip([1,0,-1,0],[0,1,0,-1]):
            solve(h+dh,w+dw,count,c)
while 1:
    H,W = map(int,raw_input().split())
    if H == W == 0: break
    A = [list(raw_input()) for _ in range(H)]
    count = 0
    for h in range(H):
        for w in range(W):
            if type(A[h][w]) is not int:
                solve(h,w,count,A[h][w])
                count += 1
    print count
n=int(raw_input())
x=map(int,raw_input().split())
ans=[-1]*(n**2+1)
for i in xrange(n):
    if ans[x[i]]!=-1:
        print("No")
        exit()
    ans[x[i]]=i+1
    cnt=n-1
    for j in xrange(1,n**2+1):
        if cnt==0:break
        if ans[j]==-1:
            cnt-=1
            ans[j]=i+1
    if cnt>0:
        print("No")
        exit()
print("Yes")
print(" ".join(map(str,ans[1:])))


### FIXED CODE ###

I,O,T,J,L,S,Z=map(int,raw_input().split())
ans=0
ans1=0
ans+=2*O
ans1+=2*O
ans+=4*(I/2)
ans+=4*(J/2)
ans+=4*(L/2)
JL=min(J,L)
if JL>=1 and I>=1:
    ans1+=6
    J-=1
    L-=1
    I-=1
ans1+=4*(I/2)
ans1+=4*(J/2)
ans1+=4*(L/2)
print(max(ans/2,ans1/2))
N,i=map(int,iput().split())
print(N-i+1)


### FIXED CODE ###

N,i=map(int,input().split())
print(int(N)-int(i)+1)
#!/usr/bin/python3
import sys

sys.setrecursionlimit(100000)

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

def f(a,b):
    if a > b:
        a,b = b,a
    if a==0 or b==0:
        return 0
    if b%a is 0:
        return int(a*(2*(b/a)-1))

    return int(2*a*int(b/a) + f(a,b%a))

print(N+f(N-X, X))


### FIXED CODE ###

#!/usr/bin/python3
N = int(input())
L = list(map(int, input().split()))

L.sort()

print(sum(L[0::2]))
n = int(input())
li = map(int,input().split())
li.sort()
print(abs(li[-1]-li[0]))

### FIXED CODE ###

n = int(input())
li = list(map(int,input().split()))
li.sort()
print(abs(li[-1]-li[0]))
n = int(input())
f=[]
for i in range(n):
    tmp = list(map(int,input().split()))
    f.append(tmp)
p=[]
for i in range(n):
    tmp = list(map(int,input().split()))
    p.append(tmp)

from itertools import *
first=True
ans=-10**12
for tmp in list(product([0,1], repeat=10)):
    if first:
        first=False
        continue

    for i in range(n):
        cnt=0
        for j in range(10):
            cnt+= tmp[j] & mise[j]
        sm=0
        for i in range(n):
            sm+=p[i][cnt]
        if ans < sm:
            ans=sm
print(ans)

### FIXED CODE ###

n = int(input())
f=[]
for i in range(n):
    tmp = list(map(int,input().split()))
    f.append(tmp)
p=[]
for i in range(n):
    tmp = list(map(int,input().split()))
    p.append(tmp)

from itertools import *
first=True
ans=-10**12
for tmp in list(product([0,1], repeat=10)):
    if first:
        first=False
        continue

    ona=[]
    for mise in f:
        cnt=0
        for j in range(10):
            cnt+= tmp[j] & mise[j]
        ona.append(cnt)

    sm=0
    for i in range(len(p)):
        sm+=p[i][ona[i]]
    if ans < sm:
        ans=sm
print(ans)
import numpy as np
N = int(input())
B = str(input())

B_array = np.array(list(map(int, list(B))))
B_1 = B_array.sum()
mod_list_m1 = []
mod_list = []
mod_list_p1 = []
if B_1 == 1:
    print(0)
else:
    for i in range(N):
        mod_list.append((2**i) % (B_1))
        mod_list_m1.append((2**i) % (B_1-1))
        mod_list_p1.append((2**i) % (B_1+1))
    mod_list = np.array(mod_list)[::-1]
    mod_list_m1 = np.array(mod_list_m1)[::-1]
    mod_list_p1 = np.array(mod_list_p1)[::-1]

    mod_m1 = B_array.dot(mod_list_m1) % (B_1-1)
    mod_p1 = B_array.dot(mod_list_p1) % (B_1+1)
    print(mod_m1)

    def calc_small(n, iter):
        iter += 1
        mod = n % bin(n).count("1")
        if mod == 0:
            return iter
        else:
            return calc_small(mod, iter)

    for i in range(N):
        mod = (mod_m1 - mod_list_m1[i]) % (B_1-1) if B_array[i] == 1 else (mod_p1 + mod_list_p1[i]) % (B_1+1)
        iter = 1
        if mod == 0:
            print(iter)
        else:
            print(calc_small(mod, iter))

### FIXED CODE ###

N = int(input())
B = input()

B_1 = B.count("1")
mod_p1 = int(B,2) % (B_1+1)
if B_1 != 1:
    mod_m1 = int(B,2) % (B_1-1)

def calc_small(n, iter):
    iter += 1
    mod = n % bin(n).count("1")

    if mod == 0:
        return iter
    else:
        return calc_small(mod, iter)

for i in range(N):
    if B_1 == 1 and int(B[i]) == 1:
        print(0)
        continue
    mod = (mod_m1 - pow(2,N-i-1,B_1-1)) % (B_1-1) if int(B[i]) == 1 else (mod_p1 + pow(2,N-i-1,B_1+1)) % (B_1+1)
    iter = 1
    if mod == 0:
        print(iter)
    else:
        print(calc_small(mod, iter))
n = int(input())
a, b, c = map(int, input().split())

count = 0
for num in [a, b, c]:
  while num%2 == 0:
    num = num//2
    count += 1

print(count)    
  

### FIXED CODE ###

n = int(input())
arr = list(map(int, input().split()))

count = 0
for num in arr:
  while num%2 == 0:
    num = num//2
    count += 1

print(count)
import sys
import os
import math

def file_input():
    f = open('input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()

    N = [0]*int(input())
    A = list(map(int, input().split()))

    for i in A:
        N[i-1]+=1

    for i in N:
        print(i)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import math


def main():

    R = int(input())
    print(R*2*math.pi)


if __name__ == '__main__':
    main()
N = int(input())
A = []
for i in range(N+1):
    if i+1 % 3 != 0 and i+1 % 5 != 0
        A.append(i)
print(sum(A))

### FIXED CODE ###

N = int(input())
A = []
for i in range(N+1):
    if i % 15 == 0:
        pass
    elif i % 3 == 0:
        pass
    elif i % 5 == 0:
        pass
    else:
        A.append(i)
print(sum(A))
n = int(input())
h = list(map(int, input().split()))
max_mount = h[0]
cnt = 0 
for i in range(n):
    if max_mount<=h[i]:
    	ans +=1
    	max_mount = h[i]
print(ans)

### FIXED CODE ###

n = int(input())
h = list(map(int, input().split()))
max_mount = h[0]
ans = 0 
for i in range(n):
    if max_mount<=h[i]:
    	ans +=1
    	max_mount = h[i]
print(ans)
a=map(int,list(input()))
print("Yes" if a[0]==a[1] and a[1]==a[2] or a[3]==a[1] and a[1]==a[2] else "No")

### FIXED CODE ###

a=list(map(int,list(input())))
print("Yes" if a[0]==a[1] and a[1]==a[2] or a[3]==a[1] and a[1]==a[2] else "No")
a,b,c,d,e = map(int, input().split())


if a == 0:
        print(1)
    elif b == 0:
        print(2)
    elif c == 0:
        print(3)
    elif d == 0:
        print(4)
    else:
        print(5)

### FIXED CODE ###

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


if a == 0:
    print(1)
elif b == 0:
    print(2)
elif c == 0:
    print(3)
elif d == 0:
    print(4)
else:
    print(5)
import bisect


def solve(a_list, b_list, position):
    # time O(log(A))
    a_right_key = bisect.bisect_left(a_list, position)
    a_left_key = a_right_key - 1
    # time O(log(B))
    b_right_key = bisect.bisect_left(b_list, position)
    b_left_key = b_right_key - 1

    a_left, a_right = a_list[a_left_key], a_list[a_right_key]
    b_left, b_right = b_list[b_left_key], b_list[b_right_key]

    ans = 10 ** 20
    for a_position in [a_left, a_right]:
        for b_position in [b_left, b_right]:
            distance1 = abs(position - a_position) + abs(a_position - b_position)
            distance2 = abs(position - b_position) + abs(a_position - b_position)
            ans = min(ans, distance1, distance2)
    return ans


def main():
    inf = 10 ** 20
    A, B, Q = map(int, input().split())

    # time O(A)
    a_list = [int(input()) for _ in range(A)]
    a_list = [-inf] + a_list + [inf]
    # time O(B)
    b_list = [int(input()) for _ in range(A)]
    b_list = [-inf] + b_list + [inf]

    # time O(Q (log(A) + log(B))
    for _ in range(Q):
        position = int(input())
        ans = solve(a_list, b_list, position)
        print(ans)


if __name__ == "__main__":
    main()


### FIXED CODE ###

import bisect


def solve(a_list, b_list, position):
    # time O(log(A))
    a_right_key = bisect.bisect_left(a_list, position)
    a_left_key = a_right_key - 1
    # time O(log(B))
    b_right_key = bisect.bisect_left(b_list, position)
    b_left_key = b_right_key - 1

    a_left, a_right = a_list[a_left_key], a_list[a_right_key]
    b_left, b_right = b_list[b_left_key], b_list[b_right_key]

    ans = 10 ** 20
    for a_position in [a_left, a_right]:
        for b_position in [b_left, b_right]:
            distance1 = abs(position - a_position) + abs(a_position - b_position)
            distance2 = abs(position - b_position) + abs(a_position - b_position)
            ans = min(ans, distance1, distance2)
    return ans


def main():
    inf = 10 ** 20
    A, B, Q = map(int, input().split())

    # time O(A)
    a_list = [int(input()) for _ in range(A)]
    a_list = [-inf] + a_list + [inf]
    # time O(B)
    b_list = [int(input()) for _ in range(B)]
    b_list = [-inf] + b_list + [inf]

    # time O(Q (log(A) + log(B))
    for _ in range(Q):
        position = int(input())
        ans = solve(a_list, b_list, position)
        print(ans)


if __name__ == "__main__":
    main()
a,b,c = map(int input().split())
print(c,a,b)

### FIXED CODE ###

a,b,c = map(int, input().split())
print(c,a,b)
n = int(input())
s = input()
cnt = 0
for i in range(n):
    if s[i] == 'A':
        if s[i+1] == 'B':
            if s[i+2] == 'C':
                cnt += 1
print(cnt)

### FIXED CODE ###

n = int(input())
s = input()
cnt = 0
for i in range(n-2):
    if s[i]=="A" and s[i+1]=="B" and s[i+2]=="C":
        cnt += 1
print(cnt)
A, B, K =map(int,input().split())

if B-A <= K:
  for i in range(A, B):
    print(i)
else:
  C = []
  for i in range(A, A+K):
    C.append(i)
  
  D = []  
  for i in range(B, B-K, -1) :
    D.append(i)

E = set(C) | set(D)
F = sorted(E)
print(F)


### FIXED CODE ###

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

if B-A <= K:
  for i in range(A, B+1):
    print(i)
else:
  C = []
  for i in range(A, A+K):
    C.append(i)
  
  D = []  
  for i in range(B, B-K, -1) :
    D.append(i)
    
  E = set(C) | set(D)
  F = sorted(E)
  
  for i in range(len(F)):
      print(F[i])
import sys
sys.setrecursionlimit(50000)

depth = int(input()) 
leaves = list(map(int, input().split(" ")))
limited = []

def find( i, depth, cur) :
    if i == depth :
        limited.append(leaves[i])
        return ( leaves[i], (leaves[i]+1)//2 )
    _max, _min = find(i+1, depth, (cur-leaves[i])*2 )
    _max = min(cur, _max+leaves[i])
    _min += leaves[i]
    if _max < _min :
        return (-float('inf'), float('inf') )
    limited.append(_max)
    return ( _max, (_min+1)//2 )

find(0, depth, 1) 
if len(limited) != depth+1 :
    print(-1)
else :
    print(sum(limited))

### FIXED CODE ###

depth = int(input()) 
leaves = list(map(int, input().split(" ")))
limited = []
limited_a = []

def solve (depth) :
    cur = 1
    i = 0 
    while i <= depth :
        limited_a.append( cur )
        if cur <= 0 and leaves[i] != 0 :
            return False
        cur=(cur-leaves[i])*2
        i+=1 
    
    _min = _max = 0
    i = depth
    while i >= 0 :
        if i==depth: 
            if leaves[i] > limited_a[i] :
                return False
            limited.append(leaves[i])
            _max = leaves[i]
            _min = (leaves[i]+1)//2
        else :
            _max = min(limited_a[i], _max+leaves[i])
            _min = (_min+leaves[i]+1)//2
            if _max < _min :
                return False 
            limited.append(_max)
        i -= 1
    return True

if solve(depth) :
    print(sum(limited))
else :
    print (-1)
a,b,c=map(int,raw_input().split())
if a>b:
  temp=a
  a=b
  b=a
else:
  pass
elif b>c:
  temp=b
  b=c
  c=b
else:
  pass
print str(a) + ' ' + str(b) + ' ' + str(c)

### FIXED CODE ###

a = map(int, raw_input().split())
a.sort()
for i in range(len(a)):
    print a[i],
A = []

N = int(input())
if N in range(1,100) :
    for i in range(1, N+1) :
        a = int(input())
        if a in range(1,int(10e8)) :
            A.append(a)
    
ma = max(A)
mi = min(A)

print(ma - mi)

### FIXED CODE ###

n = int(input())
A = input().split()
for i in range(len(A)) :
    A[i] = int(A[i])
print(max(A)-min(A))
n = int(input())
s = input()
cnt = 0
for i in range(n):
    if s[i] == 'A' and s[i+1] == 'B' and s[i+2] == 'C':
        cnt += 1
print(cnt)

### FIXED CODE ###

n = int(input())
s = input()
cnt = 0
for i in range(n-2):
    if s[i] == 'A' and s[i+1] == 'B' and s[i+2] == 'C':
        cnt += 1
print(cnt)
a, b = (int(i) for i in input().split())  
  
if b/a % 0:
	c = a + b
else:
	c = b - a
    
print(c)


### FIXED CODE ###

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

if b%a == 0:
	c = a + b
else:
	c = b - a
    
print(c)
N, M, *L = map(int, open(0).read().split())
dic = [[] for i in range(N+1)]
for a,b in zip(*[iter(L)]*2):
  dic[a].append(b)
  dic[b].append(a)
color = [0]*(N+1)
def dfs(v,c):
  color[v] = c
  for u in dic[v]:
    if color[u]==c:
      return False
    if color[u]==0 and not dfs(u,-c):
      return False
  return True
for i in range(1,N+1):
  if color[i]==0:
    if not dfs(i,1):
      print(N*(N-1)//2-M)
      break
else:
  w = sum(c==1 for c in color)
  b = N-w
  print(w*b-M)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)
N, M, *L = map(int, open(0).read().split())
dic = [[] for i in range(N+1)]
for a,b in zip(*[iter(L)]*2):
  dic[a].append(b)
  dic[b].append(a)
color = [0]*(N+1)
def dfs(v,c):
  color[v] = c
  for u in dic[v]:
    if color[u]==c:
      return False
    if color[u]==0 and not dfs(u,-c):
      return False
  return True
for i in range(1,N+1):
  if color[i]==0:
    if not dfs(i,1):
      print(N*(N-1)//2-M)
      break
else:
  w = sum(c==1 for c in color)
  b = N-w
  print(w*b-M)
n - int(input())
arr = [int(i) for i in input().split()]
dp = [0 for i in range(n)]
for i in range(1,n):
    op1 = abs(arr[i]-arr[i-1]) + dp[i-1]
    op2 = abs(arr[i]-arr[i-2]) + dp[i-2]
    dp[i] = min(op1,op2)
print(dp[n-1])

### FIXED CODE ###

n = int(input())
arr = [int(i) for i in input().split()]
dp = [0 for i in range(n)]
for i in range(1,n):
    op1 = abs(arr[i]-arr[i-1]) + dp[i-1]
    op2 = abs(arr[i]-arr[i-2]) + dp[i-2] if i != 1 else float("inf")
    dp[i] = min(op1,op2)
print(dp[n-1])
n,m = map(int,input().split())
dist = []
a = []
b = []
c = []

for i in range(m):
	a[i], b[i], c[i] = map(int,input().split())
	dist[a[i]-1][b[i]-1] = c[i]
	dist[b[i]-1][a[i]-1] = c[i]



#nは頂点、mは辺、a、bは頂点、cはaとbの距離


for i in range(n):
	for j in range(n):
		for k in range(n):
			dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j])

res = 0
for i in range(m):
	if c[i] > dist[a[i]-1][b[i]-1]:
		res += 1

print (res)


### FIXED CODE ###

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

dist = [[10**10 for i in range(n)]for j in range(n)]
for i in range(n):
	dist[i][i] == 0

a = [0]*m
b = [0]*m
c = [0]*m

for i in range(m):
	a[i], b[i], c[i] = map(int,input().split())
	dist[a[i]-1][b[i]-1] = c[i]
	dist[b[i]-1][a[i]-1] = c[i]


#nは頂点、mは辺、a、bは頂点、cはaとbの距離


for k in range(n):
	for i in range(n):
		for j in range(n):
			dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j])


res = 0
for i in range(m):
	if c[i] > dist[a[i]-1][b[i]-1]:
		res += 1

print(res)