def f(a, b):
return 3*(a+b)**3+(275*b)**2-127*a-41
a = int(input('Enter 1st number: '))
b = int(input('Enter 2nd number: '))
print(f(a, b))
f = lambda a,b: 3*(a+b)**3+275*b**2-127*a-41
while True:
a, b = map(int, input('a b: ').split())
print(f(a, b))