AtCoder Beginner Contest 058 - ι⊥l

Three poles stand evenly spaced along a line. Their heights are a, b and c meters, from left to right.
We will call the arrangement of the poles beautiful if the tops of the poles lie on the same line, that is, b-a = c-b.
Determine whether the arrangement of the poles is beautiful.

-----Constraints-----
 - 1 \leq a,b,c \leq 100
 - a, b and c are integers.

-----Input-----
Input is given from Standard Input in the following format:
a b c

-----Output-----
Print YES if the arrangement of the poles is beautiful; print NO otherwise.

-----Sample Input-----
2 4 6

-----Sample Output-----
YES

Since 4-2 = 6-4, this arrangement of poles is beautiful.

Source: atcoder | Difficulty: EASY


Solutions:
(a, b, c) = [int(_) for _ in input().split()]
ans = b - a == c - b
print('YES' if ans else 'NO')


(a, b, c) = map(int, input().split())
if b - a == c - b:
	print('YES')
else:
	print('NO')


(A, B, C) = map(int, input().split())
if B - A == C - B:
	print('YES')
else:
	print('NO')


(a, b, c) = [int(x) for x in input().split()]
print('YES' if b - a == c - b else 'NO')


(a, b, c) = map(int, input().split())
print(' YNEOS'[b - a == c - b::2])


(x, y, z) = map(int, input().split())
if z - y == y - x:
	print('YES')
else:
	print('NO')


(a, b, c) = (int(T) for T in input().split())
print(['NO', 'YES'][c - b == b - a])


(a, b, c) = map(int, open(0).read().split())
if b - a == c - b:
	print('YES')
else:
	print('NO')


(a, b, c) = map(int, input().split())
print(('NO', 'YES')[b - a == c - b])


def main():
	t = list(map(int, input().split()))
	if t[1] - t[0] == t[2] - t[1]:
		print('YES')
	else:
		print('NO')

def __starting_point():
	main()
__starting_point()


def iroha():
	(a, b, c) = list(map(int, input().split()))
	one = b - a
	two = c - b
	if one == two:
		print('YES')
	else:
		print('NO')

def __starting_point():
	iroha()
__starting_point()


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

def __starting_point():
	if b - a == c - b:
		print('YES')
	else:
		print('NO')
__starting_point()


a = input().split()
if int(a[2]) - int(a[1]) == int(a[1]) - int(a[0]):
	print('YES')
else:
	print('NO')


(a, b, c) = map(int, input().split())
ans = 'NO'
if 2 * b == a + c:
	ans = 'YES'
print(ans)


(A, B, C) = [int(x) for x in input().split()]
print('YES') if B - A == C - B else print('NO')


(pole1, pole2, pole3) = map(int, input().split())
if pole2 - pole1 == pole3 - pole2:
	print('YES')
else:
	print('NO')


(a, b, c) = map(int, input().split())
print(['NO', 'YES'][2 * b - a - c == 0])


print((lambda a, b, c: 'YNEOS'[a - 2 * b + c != 0::2])(*map(int, input().split())))


S_list = list(map(int, input().split()))
if S_list[1] - S_list[0] == S_list[2] - S_list[1]:
	result = 'YES'
else:
	result = 'NO'
print(result)


(a, b, c) = list(map(int, input().split()))
result = 'NO'
if b - a == c - b:
	result = 'YES'
elif a - b == b - c:
	result = 'YES'
print(result)


(a, b, c) = map(int, input().split())
if b - a == c - b:
	print('YES')
	exit()
print('NO')


import sys
(a, b, c) = list(map(int, input().split()))
print('YES' if b * 2 == a + c else 'NO')


l = list(map(int, input().split()))
print('YES' if l.count(sum(l) / 3) != 0 else 'NO')


(a, b, c) = map(int, input().split())
if (1 <= a & a <= 100) & (1 <= b & b <= 100) & (1 <= c & c <= 100):
	d_ab = b - a
	d_bc = c - b
	if d_ab == d_bc:
		print('YES')
	else:
		print('NO')


print(('NO', 'YES')[sum((int(x) * y for (x, y) in zip(input().split(), [1, -2, 1]))) == 0])


(a, b, c) = [int(i) for i in input().split()]
print('YES' if 2 * b == a + c else 'NO')


(A, B, C) = map(int, input().split())
print(['NO', 'YES'][B - A == C - B])


(a, b, c) = [int(s) for s in input().split()]
print(['NO', 'YES'][a - b == b - c])


(a, b, c) = map(int, input().split())
print('NYOE S'[b - a == c - b::2])


(A, B, C) = [int(n) for n in input().split()]
print('YES' if B * 2 == A + C else 'NO')


a = [int(i) for i in input().split()]
print('YES' if a[1] * 2 == a[0] + a[2] else 'NO')