Read n. For each number, check if middle digit is average of first and last. Print YES/NO.
Write a complete program: read the input with input() and print the result with print().
input()
print()
Input
4 121 135 246 1234
Output
NO YES YES NO