Buggy python submission (verdict: Runtime Error):
from math import factorial
n,m = map(int,input().split())

if n == 0:
   N = 0
if n == 1:
    N = 0
else:
    N = factorial(n)/factorial(2)/factorial(n-2)
if m == 0:
   M = 0
if m == 1:
    M = 0
else:
    M = factorial(m)/factorial(2)/factorial(m-2)

print(int(N+M))


Fixed submission:
from math import factorial
n,m = map(int,input().split())

if n == 0:
   N = 0
elif n == 1:
    N = 0
else:
    N = factorial(n)/factorial(2)/factorial(n-2)
if m == 0:
   M = 0
elif m == 1:
    M = 0
else:
    M = factorial(m)/factorial(2)/factorial(m-2)

print(int(N+M))

Buggy python submission (verdict: Runtime Error):
from math import factorial
n,m = map(int,input().split())

if n == 0:
   N = 0
if n == 1:
    N = 1
else:
    N = factorial(n)/factorial(2)/factorial(n-2)
if m == 0:
   M = 0
if m == 1:
    M = 0
else:
    M = factorial(m)/factorial(2)/factorial(m-2)

print(int(N+M))


Fixed submission:
from math import factorial
n,m = map(int,input().split())

if n == 0:
   N = 0
elif n == 1:
    N = 0
else:
    N = factorial(n)/factorial(2)/factorial(n-2)
if m == 0:
   M = 0
elif m == 1:
    M = 0
else:
    M = factorial(m)/factorial(2)/factorial(m-2)

print(int(N+M))

Buggy python submission (verdict: Runtime Error):
from math import factorial
n,m = map(int,input().split())

if n == 0:
   M = 0
if n == 1:
    M = 1
else:
    N = factorial(n)/factorial(2)/factorial(n-2)
if m == 0:
   M = 0
if m == 1:
    M = 0
else:
    M = factorial(m)/factorial(2)/factorial(m-2)

print(int(N+M))


Fixed submission:
from math import factorial
n,m = map(int,input().split())

if n == 0:
   N = 0
elif n == 1:
    N = 0
else:
    N = factorial(n)/factorial(2)/factorial(n-2)
if m == 0:
   M = 0
elif m == 1:
    M = 0
else:
    M = factorial(m)/factorial(2)/factorial(m-2)

print(int(N+M))

Buggy python submission (verdict: Runtime Error):
from math import factorial
n,m = map(int,input().split())

N = factorial(n)/factorial(2)/factorial(n-2)
M = factorial(m)/factorial(2)/factorial(m-2)

print(N+M)


Fixed submission:
from math import factorial
n,m = map(int,input().split())

if n == 0:
   N = 0
elif n == 1:
    N = 0
else:
    N = factorial(n)/factorial(2)/factorial(n-2)
if m == 0:
   M = 0
elif m == 1:
    M = 0
else:
    M = factorial(m)/factorial(2)/factorial(m-2)

print(int(N+M))

Buggy python submission (verdict: Runtime Error):
from math import factorial
n,m = map(int,input().split())

N = factorial(n)/factorial(2)/factorial(n-2)
M = factorial(M)/factorial(2)/factorial(m-2)

print(N+M)


Fixed submission:
from math import factorial
n,m = map(int,input().split())

if n == 0:
   N = 0
elif n == 1:
    N = 0
else:
    N = factorial(n)/factorial(2)/factorial(n-2)
if m == 0:
   M = 0
elif m == 1:
    M = 0
else:
    M = factorial(m)/factorial(2)/factorial(m-2)

print(int(N+M))

Buggy python submission (verdict: Runtime Error):
from scipy.special import comb

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

ans = comb(n,2,exact=True) + comb(m,2,exact=True)


Fixed submission:
from math import factorial
n,m = map(int,input().split())

if n == 0:
   N = 0
elif n == 1:
    N = 0
else:
    N = factorial(n)/factorial(2)/factorial(n-2)
if m == 0:
   M = 0
elif m == 1:
    M = 0
else:
    M = factorial(m)/factorial(2)/factorial(m-2)

print(int(N+M))

Buggy python submission (verdict: Runtime Error):
from scipy.special import import comb

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

ans = comb(n,2,exact=True) + comb(m,2,exact=True)


Fixed submission:
from math import factorial
n,m = map(int,input().split())

if n == 0:
   N = 0
elif n == 1:
    N = 0
else:
    N = factorial(n)/factorial(2)/factorial(n-2)
if m == 0:
   M = 0
elif m == 1:
    M = 0
else:
    M = factorial(m)/factorial(2)/factorial(m-2)

print(int(N+M))

Buggy python submission (verdict: Runtime Error):
				
def factorial(number):
	if number>2:
		return number*factorial(number-1)
	elif not number==0:
		return number
	else:
		return 1
def choose2(number):
	if number>=2:
		return number*(number-1)/2
	else:
		return 0
N = int(input())
klist = input()
k = []
for x in range(N-1):
	k.append(int(klist[:klist.index(" ")]))
	klist = klist[klist.index(" ")+1:]
k.append(int(klist))
valArr = list(set(k))
occurence = []
for i in range(len(valArr)):
	occurence.append(0)
for j in range(N):
	for x in range(len(valArr)):
		if k[j]==valArr[x]:
			occurence[x]+=1
for ball in range(len(k)):
	ans = 0
	kArray = occurence[:len(occurence)]
	for index in range(len(valArr)):
		if valArr[index]==k[ball]:
			kArray[index]-=1
			break;
	for time in kArray:
		ans+=choose2(time)
	print(int(ans))


Fixed submission:
#Contest 159
x = input()
N = int(x[:x.index(" ")])
M = int(x[x.index(" ")+1:])
def factorial(number):
	if number>2:
		return number*factorial(number-1)
	elif not number==0:
		return number
	else:
		return 1
def choose2(number):
	if number>=2:
		return factorial(number)/(2*factorial(number-2))
	else:
		return 0

print(int(choose2(N)+choose2(M)))