# 1. If interviewer ask about the nth element in pascal triangle the simple answer will be
# r-1C(c-1) if we need to find row no 5 with col no 3 it will be 4c2= 6

#To compute Pascal Triangle's nth element

def fac(n):
    if n<=1:
        return 1
    else:
        return n*(n-1)

r,c=map(int,input().split())
r=r-1
c=c-1
print(r,c)
print(fac(r)//fac(r-c))

# 1. If interviewer ask about the nth element in pascal triangle the simple answer will be
# r-1C(c-1) if we need to find row no 5 with col no 3 it will be 4c2= 6

#To compute Pascal Triangle's nth element

def fac(n):
    if n<=1:
        return 1
    else:
        return n*(n-1)

r,c=map(int,input().split())
r=r-1
c=c-1
print(r,c)
print(fac(r)//fac(r-c))

# 1. If interviewer ask about the nth element in pascal triangle the simple answer will be # r-1C(c-1) if we need to find row no 5 with col no 3 it will be 4c2= 6 #To compute Pascal Triangle's nth element