Harryxun/stf_run huggingface dataset:
def resolve():
    N, M = map(int, input().split())

    person_group = [0] * (N+1)
    group_counter = 0
    member_counter = {0: 0}

    def _marge_group(a, b):
        for i in range(1, N+1):
            if person_group[i] == b:
                person_group[i] == a
        member_counter[a] += member_counter.pop(b)

    for _ in range(M):
        A, B = map(int, input().split())
        if person_group[A] == 0 and person_group[B] == 0:
            group_counter += 1
            person_group[A] = group_counter
            person_group[B] = group_counter
            member_counter[group_counter] = 2
        elif person_group[A] != 0 and person_group[B] == 0:
            person_group[B] = person_group[A]
            member_counter[person_group[A]] += 1
        elif person_group[A] == 0 and person_group[B] != 0:
            person_group[A] = person_group[B]
            member_counter[person_group[B]] += 1
        else:
            if person_group[A] == person_group[B]:
                continue
            else:
                _marge_group(person_group[A], person_group[B])
    print(max(member_counter.values()))

if __name__ == "__main__":
    resolve()

### FIXED CODE ###

class UnionFind():
    def __init__(self, n: int):
        """
        n: ノード数
        """
        self.n = n
        """
        d: UnionFind木のデータ構造
            各要素の根要素を格納するリスト
            根要素の場合は, グループの要素数*-1を格納する
        """
        self.d = [-1] * n

    def find(self, x: int) -> int:
        """
        要素xが属するグループの根を返す
        """
        if self.d[x] < 0:
            return x
        else:
            self.d[x] = self.find(self.d[x])
            return self.d[x]

    def unite(self, x: int, y: int) -> bool:
        """
        要素xが属するグループと, 要素yが属するグループを併合する
        """
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return False

        if self.d[x] > self.d[y]:
            x, y = y, x
        self.d[x] += self.d[y]
        self.d[y] = x
        return True

    def same(self, x: int, y: int) -> bool:
        """
        要素x, yが同じグループに属するかどうかを返す
        """
        return self.find(x) == self.find(y)

    def size(self, x: int) -> int:
        """
        要素xが属するグループのサイズ(要素数)を返す
        """
        return -self.d[self.find(x)]

    def members(self, x: int) -> list:
        """
        要素xが属するグループの要素をリストで返す
        """
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def groups(self) -> list:
        """
        すべての根の要素をリストで返す
        """
        return [i for i, x in enumerate(self.d) if x < 0]

    def group_count(self) -> int:
        """
        グループの数を返す
        """
        return len(self.groups())


def resolve():
    N, M = map(int, input().split())

    uf = UnionFind(N)

    for _ in range(M):
        A, B = map(int, input().split())
        uf.unite(A-1, B-1)

    ans = 0
    for i in uf.groups():
        ans = max(ans, uf.size(i))
    print(ans)

if __name__ == "__main__":
    resolve()
A, B, C, D = map(int, input().split())
 
flg = true
t = false
while(flg):
  t = true
  C -= B
  if (C <= 0):
    break
  t = false
  D -= B
  if (D <= 0) :
    break

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

### FIXED CODE ###

A, B, C, D = map(int, input().split())
 
flg = True
t = False
while(flg):
  C -= B
  if (C <= 0):
    t = True
    break
  A -= D
  if (A <= 0) :
    t = False
    break

if (t):
  print("Yes")
else:
  print("No")
n = int(raw_input())
 
INFTY = float('inf')
 
color = [0 for i in range(n)]
M = [[INFTY for i in range(n)] for j in range(n)]
d = [INFTY for i in range(n)]
p = [-1 for i in range(n)]
 
def MST():
    d[0] = 0
 
    while 1:
        cost = INFTY
        for i in range(n):
            if color[i] != 2 and d[i] < cost:
                cost = d[i]
                u = i
 
      if cost == INFTY:
          break
     
      color[u] = 2
 
      for v in range(n):
          if color[v] != 2 and M[u][v] != INFTY and M[u][v] < d[v]:
              d[v] = M[u][v]
              p[v] = u
              color[v] = 1
 
    sum = 0
    for i in range(n):
        if p[i] != -1:
            sum += M[i][p[i]]
    return sum
 
for i in range(n):
    G = map(int, raw_input().split())
    for j in range(n):
       if G[j] != -1:
         M[i][j] = G[j]
 
print MST()

### FIXED CODE ###

n = int(raw_input())
 
INFTY = float('inf')
 
color = [0 for i in range(n)]
M = [[INFTY for i in range(n)] for j in range(n)]
d = [INFTY for i in range(n)]
p = [-1 for i in range(n)]
 
def MST():
  d[0] = 0
 
  while True:
    cost = INFTY
    for i in range(n):
      if color[i] != 2 and d[i] < cost:
        cost = d[i]
        u = i
 
    if cost == INFTY:
      break
     
    color[u] = 2
 
    for v in range(n):
      if color[v] != 2 and M[u][v] != INFTY and M[u][v] < d[v]:
        d[v] = M[u][v]
        p[v] = u
        color[v] = 1
 
  sum = 0
  for i in range(n):
    if p[i] != -1:
      sum += M[i][p[i]]
  return sum
 
for i in range(n):
  G = map(int, raw_input().split())
  for j in range(n):
   if G[j] != -1:
     M[i][j] = G[j]
 
print MST()
x = int(input())
key = [True] + [False]*99 + [True]*6 + [0]*(x+1)
def dp(x):
    if key[x] == 0:
        key[x] = any([dp(x-100), dp(x-101), dp(x-102), dp(x-103), dp(x-104), dp(x-105)])
    return key[x]
if dp(x):
    print(1)
else:
    print(0)

### FIXED CODE ###

import sys
x = int(input())
for i in range(1000):
    if 100*i <= x <= 105*i:
        print(1)
        sys.exit()
print(0)
li = list(map(int, input().split()))
if (set(len(li))) == 2:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

li = list(map(int, input().split()))
if (len(set(li))) == 2:
    print("Yes")
else:
    print("No")
#from collections import deque,defaultdict
printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
ins = lambda : input().strip()
DBG = True  and False
BIG = 10**18
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

def modinv2(x,r):
  return pow(x,r-2,r)

def comb(n,k):
    ret = fact[n]*modinv2(fact[n-k]*fact[k],R)%R
    ddprint(f"comb {n=} {k=} {ret=}")
    return ret

n = inn()
a = inl()
fact = [1]*(n+1)
for i in range(1,n+1):
    fact[i] = (fact[i-1]*i)%R
ddprint(fact)
c = [-1]*(n+1)
for m in range(n+1):
    x = a[m]
    if c[x]>=0:
        i = c[x]
        j = m+1
        break
    c[x] = m+1
#ddprint(f"{n=} {i=} {j=}")
print(n) # k=1
for k in range(2,n):
    #ddprint(f"{k=}")
    v0 = comb(n-1,k) if k<=n-1 else 0
    #ddprint(f"{v0=}")
    v2 = comb(n-1,k-2) if k>=2 else 0
    #ddprint(f"{v2=}")
    v1 = 2*comb(n-1,k-1) - \
         (0 if n-j+i<k-1 else comb(n-j+i,k-1))
    #ddprint(f"{k=} {v0=} {v1=} {v2=}")
    print((v0+v1+v2)%R)
if n>1:
    print(n if j==i+1 else n+1) # k=n
print(1) # k=n+1


### FIXED CODE ###

#from collections import deque,defaultdict
printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
ins = lambda : input().strip()
DBG = True  and False
BIG = 10**18
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

def modinv2(x,r):
  return pow(x,r-2,r)

def comb(n,k):
    ret = fact[n]*modinv2(fact[n-k]*fact[k],R)%R
    #ddprint(f"comb {n=} {k=} {ret=}")
    return ret

n = inn()
a = inl()
fact = [1]*(n+1)
for i in range(1,n+1):
    fact[i] = (fact[i-1]*i)%R
ddprint(fact)
c = [-1]*(n+1)
for m in range(n+1):
    x = a[m]
    if c[x]>=0:
        i = c[x]
        j = m+1
        break
    c[x] = m+1
#ddprint(f"{n=} {i=} {j=}")
print(n) # k=1
for k in range(2,n):
    #ddprint(f"{k=}")
    v0 = comb(n-1,k) if k<=n-1 else 0
    #ddprint(f"{v0=}")
    v2 = comb(n-1,k-2) if k>=2 else 0
    #ddprint(f"{v2=}")
    v1 = 2*comb(n-1,k-1) - \
         (0 if n-j+i<k-1 else comb(n-j+i,k-1))
    #ddprint(f"{k=} {v0=} {v1=} {v2=}")
    print((v0+v1+v2)%R)
if n>1:
    print(n if j==i+1 else n+1) # k=n
print(1) # k=n+1
a,b=map(int,input().split())
#print(ab)
x=input()
#print(x)
x1=x[:a]
x2=x[a]
x3=x[a+1:a+b+1]
if x2=="-" and  all(int(x1[i])>=0 and int(x1[i])<=9 for i in range(a)) and all(int(x3[j])>=0 and int(x3[j])<=9 for j in range(b)):
    print("Yes")
else:
    print("No")

### FIXED CODE ###

a,b=map(int,input().split())
#print(ab)
x=input()
#print(x)
x1=x[:a]
x2=x[a]
x3=x[a+1:a+b+1]
#print(x1)
#print(x2)
#print(x3)


if x2=="-" and  (all(x1[i] in ["0","1","2","3","4","5","6","7","8","9"] for i in range(a))) and (all(x3[j] in ["0","1","2","3","4","5","6","7","8","9"]   for j in range(b))):
    print("Yes")
else:
    print("No")
a,b,c=map(int,input().split())
if a,b,c == 5,5,7 
	print("YES")
else:
	print("NO")

### FIXED CODE ###

s=list(map(int,input().split()))
if s == [5,5,7] or s == [7,5,5] or s == [5,7,5]: 
	print("YES")
else:
	print("NO")
hp = int(input())
attack = int(input())

print(-(-(hp) //attack))



### FIXED CODE ###

kazu = list(map(int, input().split()))

print(-(-(kazu[0]) // kazu[1]))
a = str(input())

if "&7" in a:
  print("Yes")
 else:
  print("No")

### FIXED CODE ###

a = str(input())

if "7" in a:
  print("Yes")
else:
  print("No")
if __name__ == "__main__":
    a = int(input())
    b = int(input())
    c = int(input())
    k = int(input())

    if (k <= a + b):
        print(a)
    else:
        print(a - k + a + b)


### FIXED CODE ###

if __name__ == "__main__":
    num = list(map(int, input().split()))

    if (num[3] == 0):
        print(0)
    elif (num[0] == 0 and num[1] == 0 and num[2] == 0):
        print(0)
    elif (num[3] <= num[0]):
        print(num[3])
    else:
        print(num[0] - num[3] + num[0] + num[1])
S=int(input())

if S<10**18
    X1,Y1=0,0

    mod=10**9

    X2=mod
    Y3=S//mod + 1

    Y2=1
    X3=mod-S%mod
else:
    X1,Y1,X2,Y3=0,0,0,0
    Y2=10**9
    Y3=10**9

print(X1,Y1,X2,Y2,X3,Y3)


### FIXED CODE ###

S=int(input())

if S<10**18:
    X1,Y1=0,0

    mod=10**9

    X2=mod
    Y3=S//mod + 1

    Y2=1
    X3=mod-S%mod
else:
    X1,Y1,X2,Y3=0,0,0,0
    Y2=10**9
    X3=10**9

print(X1,Y1,X2,Y2,X3,Y3)
a,b,c = map(input().split())

print(a*b//2)

### FIXED CODE ###

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

print(a*b//2)
# coding: utf-8

import codecs
import sys

sys.stdout = codecs.getwriter("shift_jis")(sys.stdout) # ??????
sys.stdin = codecs.getreader("shift_jis")(sys.stdin) # ??\???

# ??\??¬?????????print??????????????´?????? print(u'?????????') ??¨??????
# ??\??¬?????????input??? input(u'?????????') ??§OK
# ??°?¢???????????????????????????´??????6,7???????????????????????¢??????

height, width = map(int, raw_input.split(" "))
print("{0} {1}".format(height*width, 2*(height+width)))

### FIXED CODE ###

deglist = raw_input().split(" ")
height = int(deglist[0])
width = int(deglist[1])
menseki = height * width
nagasa = 2 * (height + width)
print menseki, nagasa
N,K,S = map(int,input().split())
X = [1000000000 for _ in range(N)]
ans=""
for i in range (K):
    X[i]=S

print(*X)

### FIXED CODE ###

import math
H=int(input())
W=int(input())
N=int(input())
if H<W :
    max=W
else:
    max=H
ans=math.ceil(N/max)
print(ans)
d=int(input())
if d == 25:
  print('Christmas')
else if d == 24:
  print('Christmas Eve')
else if d == 23:
  print('Christmas Eve Eve')
else if d == 22:
  print('Christmas Eve Eve Eve')

### FIXED CODE ###

d=int(input())
if d == 25:
  print('Christmas')
elif d == 24:
  print('Christmas Eve')
elif d == 23:
  print('Christmas Eve Eve')
elif d == 22:
  print('Christmas Eve Eve Eve')
N,K,M = input().split()
N = int(N)
K = int(K)
M = int(M)
A = input().split()
A = [int(s) for s in A]
AN = M * N - sum(A)
if (AN <= K) and (AN >= 0):
	print (AN)
else:
	print (-1)

### FIXED CODE ###

a = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
C = input()
if (C != 'z') and (C in a):
	i = a.index(C)
	print (a[i+1])
s=input()
a=""
for k in range(len(s)):
    if s[k]=="0":
        a=a+"0"
    elif s[k]=="1":
        a=a+"1"
    elif s[k]=="b":
        a=a.rstrip(a[-1])
print a

### FIXED CODE ###

s=raw_input()
a=""
for k in range(len(s)):
    if s[k]=="0":
        a=a+"0"
    elif s[k]=="1":
        a=a+"1"
    elif s[k]=="B":
        if len(a)>0:
            a=a[0:len(a)-1]
print a
s=input()
t=input()


result=''
dp=[[0]*len(t) for _ in range(len(s))]

for i in range(len(s)):
    for j in range(len(t)):
        if i==0:
            if s[i]==t[j]:
                dp[i][j]=1
            else:
                dp[i][j]=dp[i][j-1] if j>=1 else 0
        elif j==0:
            if s[i]==t[j]:
                dp[i][j]=1
            else:
                dp[i][j]=dp[i-1][j]
        else:
            if s[i]==t[j]:
                dp[i][j]=dp[i-1][j-1]+1
            else:
                dp[i][j]=max(dp[i-1][j],dp[i][j-1])

i=len(s)-1
j=len(t)-1

L=dp[i][j]

while L>=1:
    if i==0 and dp[i][j]==1:
        result+=s[i]
        L-=1
    elif j==0 and dp[i][j]==1:
        result+=t[i]
        L-=1
    elif dp[i][j]>dp[i-1][j]:
        result+=s[i]
        i-=1
        L-=1
    elif dp[i][j]>dp[i][j-1]:
        result+=t[j]
        j-=1
        L-=1
    elif dp[i][j]>dp[i-1][j-1]:
        result+=t[j]
        L-=1
        i-=1
        j-=1
    else:
        i-=1
        j-=1


print(result[::-1])
    

### FIXED CODE ###

s=input()
t=input()


result=''
dp=[[0]*len(t) for _ in range(len(s))]

for i in range(len(s)):
    for j in range(len(t)):
        if i==0:
            if s[i]==t[j]:
                dp[i][j]=1
            else:
                dp[i][j]=dp[i][j-1] if j>=1 else 0
        elif j==0:
            if s[i]==t[j]:
                dp[i][j]=1
            else:
                dp[i][j]=dp[i-1][j]
        else:
            if s[i]==t[j]:
                dp[i][j]=dp[i-1][j-1]+1
            else:
                dp[i][j]=max(dp[i-1][j],dp[i][j-1])

i=len(s)-1
j=len(t)-1

L=dp[i][j]

while L>=1:
    if i==0 and dp[i][j]==1:
        result+=s[i]
        L-=1
    elif j==0 and dp[i][j]==1:
        result+=t[j]
        L-=1
    elif dp[i][j]==dp[i-1][j]:
        i-=1
    elif dp[i][j]==dp[i][j-1]:
        j-=1
    else:
        result+=t[j]
        L-=1
        i-=1
        j-=1


print(result[::-1])
N = int(input())
array = [int(x) for x in input().split()]
for i in array:
  if i % 2 == 0:
    if i % 3 == 0 or i % 5 == 0:
      fg = True
    else:
      fg = False
      print('DENIED')
      break
if fg:
  print('APPROVED') 

### FIXED CODE ###

N = int(input())
array = [int(x) for x in input().split()]
fl=True
for i in array:
  if i % 2 == 0:
    if i % 3 != 0 and i % 5 != 0:
        fl = False
if fl: print('APPROVED')
else:print('DENIED')
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c　a * b
if c % 2 == 1:
  print("Odd")
elese:
  print("Even")

### FIXED CODE ###

# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = (a * b) % 2
if c == 0:
  print("Even")
else :
  print("Odd")
x = input()
y = x[-1]
if y == 3:
  print("bon")
elif y == 0,:
  print("pon")
elif y == 1:
  print("pon")
elif y == 6:
  print("pon")
elif y == 8:
  print("pon")
else:
  print("hon")

### FIXED CODE ###

x = int(input())
y = x%10
if y == 3:
  print("bon")
elif y == 0:
  print("pon")
elif y == 1:
  print("pon")
elif y == 6:
  print("pon")
elif y == 8:
  print("pon")
else:
  print("hon")
import sys
input = sys.stdin.readline

def abX():
    ans = 0
    for a,b in AB:
        for c,d in CD:
            if a<c and b<d:
                ans+=1
                CD.remove([c,d])
                break
    return ans

def abY():
    ans = 0
    for a,b in ab:
        for c,d in cd:
            if a<c and b<d:
                ans+=1
                cd.remove([c,d])
                break
    return ans

print(max(abX(),abY()))

### FIXED CODE ###

import sys
input = sys.stdin.readline
N = int(input())
AB = [list(map(int,input().split())) for _ in range(N)]
CD = [list(map(int,input().split())) for _ in range(N)]
AB.sort(reverse=1,key=lambda x:x[1])
CD.sort()
ans = 0
for c,d in CD:
    for a,b in AB:
        if a<c and b<d:
            ans+=1
            AB.remove([a,b])
            break
print(ans)
While True:
  a, op, b = int(raw_input()), raw_input(), int(raw_input())
  if op == "+":
    print a+b
  elif op == "-":
    print a-b
  elif op == "*":
    print a*b
  elif op == "/":
    print a/b
  else:
    break

### FIXED CODE ###

while True:
  s = raw_input().split()
  a = int(s[0])
  op = s[1]
  b = int(s[2])
  if op == '?':
    break
  elif op == '+':
    print (a+b)
  elif op == '-':
    print (a-b)
  elif op == '*':
    print (a*b)
  elif op == '/':
    print (a/b)
i = list(map(int, input().split()))
n = i[0]
k = i[1]

if n >= 1 and n <= 100 and k >= 1 and k <= 100:
  if n > 2:
    if n > k - 2:
      if n % 2 == 1:
        if n / k >= 1:
          print("YES")
        elif n % k == 1:
          print("YES")
        else:
          print("NO")
      elif:
        if n / k >= 2:
          print("YES")
        elif n % k == 0:
          print("YES")
        else:
          print("NO")
      else:
        print("NO")
    else:
      print("NO")
  else:
    print("NO")
else:
  print("NO")


### FIXED CODE ###

i = list(map(int, input().split()))
n = i[0]
k = i[1]

if n >= 1 and k <= 100:
  if n == 1 and k == 1:
    print("YES")
  elif n > k:
    if n % 2 == 1:
      if int(n / k) >= 2:
        print("YES")
      elif int(n / k) == 1 and (int(n % k) == k - 1):
        print("YES")
      else:
        print("NO")
    else:
      if int(n / k) >= 2:
        print("YES")
      elif n % k == 0:
        print("YES")
      else:
        print("NO")
  else:
    print("NO")
n=int(input()
h=list(map(int,input().split()))
ans=0
for i in range(max(h)):
      cnt=0
      for j in range(n):
            if h［j］>=i+1:
                  cnt+=1
            elif j==n-1:
                  ans+=cnt
            else:
                  ans+=cnt
                  cnt=0
print(ans)

### FIXED CODE ###

n=int(input())
h=list(map(int,input().split()))
h.append(0)
ans=0
for i in range(max(h)):
    cnt=0
    for j in range(n+1):
        if h[j]>=i+1:
            cnt+=1
        else:
            if cnt>=1:
                ans+=1
            cnt=0
print(ans)
x = int(raw_intput())

1000ureshi = x / 500
5ureshi = (x % 500) / 5

ureshimi = 1000ureshi + 5ureshi

print(1000ureshi + 5ureshi)

### FIXED CODE ###

X = int(input())
 
a = X // 500
b = (X - a * 500) // 5
 
print(1000 * a + 5 * b)
# -*- coding: utf-8 -*-
from collections import Counter
from itertools import combinations
import math

N = int(input())
c = ["".join(sorted(str(input()))) for x in range(N)]
cs = Counter(c)

ans=0
for i in cs.values():
    ans += math.factorial(i)/2

print(int(ans))

### FIXED CODE ###

# -*- coding: utf-8 -*-
from collections import Counter
from itertools import combinations

N = int(input())
c = ["".join(sorted(str(input()))) for x in range(N)]
cs = Counter(c)

ans=0
for i in cs.values():
    if i!=1:
        ans += (i * (i-1))/2

print(int(ans))
N=int(input())
s=input()
 
print(s.count('ABC'))

### FIXED CODE ###

K,X=map(int, input().split())
if K*500>=X:
    print('Yes')
else:
    print('No')
N = int(input())
S=list(input().split())
Slist = [0] * N
for i in range(N):
    Slist[i] = sorted(S[i])
def get_unique_list(seq):
    seen = []
    return [x for x in seq if x not in seen and not seen.append(x)]
print(len(Slist) - len(get_unique_list(Slist)) + 1)

### FIXED CODE ###

from collections import Counter
 
N = int(input())
 
ans = {}
answer = 0
for _ in range(N):
    s = "".join(sorted(input()))
 
    if s not in ans:
        ans[s] = 0
 
    else:
        ans[s] += 1
        answer += ans[s]
 
print(answer)
N,K = map(int,input().split())
A = list(map(int,input().split()))
A.sort()

num = []
cnt = []

for a in A:
    if a not in num:
        num.append(a)
        cnt.append(1)
    else:
        cnt[-1] += 1
cnt.sort()
#print(num,cnt)

res = 0
M = len(cnt)
if M <= K:
    res = 0
else:
    for i in range(M-K):
        res += cnt[i]
print(res)
  

### FIXED CODE ###

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

num = []
cnt = []

for i in range(N):
    if i == 0:
        num.append(A[i])
        cnt.append(1)
    else:
        if A[i-1] != A[i]:
            num.append(A[i])
            cnt.append(1)
        else:
            cnt[-1] += 1
cnt.sort()
#print(num,cnt)

res = 0
M = len(cnt)
if M <= K:
    res = 0
else:
    for i in range(M-K):
        res += cnt[i]
print(res)
import math
a,b,c,d = map(int, input().split())

count_c = b // c - (a-1) // c
count_d = b // d - (a-1) // d
lcm_cd = c * d / math.gcd(c, d)
count_cd = b // lcm_cd - (a-1) // lcm_cd

print(b - a - int(count_c+count_d-count_cd) + 1)


### FIXED CODE ###

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

cnt_c = b // c - (a-1) // c
cnt_d = b // d - (a-1) // d
lcm = c * d // fractions.gcd(c, d)
cnt_cd = b // lcm - (a-1) // lcm

mul = cnt_c + cnt_d - cnt_cd

print(b - a + 1 - mul)
int = list(map(int,input().split()))

k=int.pop(0)
x=int.pop(1)

p=range((x+1)-k,x+k)

print(p)

### FIXED CODE ###

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

k = int[0]
x = int[1]

p=x + 1 
q=p - k
r=x + k

s =list(range(q,r))
print(*s)
K, A, B = map(int, input().split())

need_turns = A + 1 + 1  # 交換に必要なターン
first_need_turns = need_turns - 1

if A + 2 > B or K < first_need_turns:  # 交換せずにビスケットを叩き続ける方が得
    print(1 + K)
    exit()

ans = B  # 一度交換した
K -= (need_turns - 1)

# print("{}, {}".format(K, ans))

while K >= 0:
    if ans >= A and K >= 2:
        ans += (B - A) * K / 2
        K = 0
    else:
        ans += 1
        K -= 1

print(ans)


### FIXED CODE ###

# https://yahoo-procon2019-qual.contest.atcoder.jp/tasks/yahoo_procon2019_qual_a

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

if K <= (N + 1) / 2:
    print("YES")
else:
    print("NO")
#include <stdio.h>
int main(){
    long int W, H, x, y, ans;
    scanf("%ld %ld %ld %ld",&W,&H,&x,&y);
    if(2*x==W && 2*y==H){
        ans = 1;
    }
    else{
        ans = 0;
    }
    printf("%lf %ld\n", W*H/2.0, ans);

    return 0;
}

### FIXED CODE ###

W,H,x,y = map(int, input().split())
if 2*x==W and 2*y==H:
    ans = 1
else:
    ans = 0
print(W*H/2, ans)