AtCoder Beginner Contest 058
翻译中…
Problem Statement
翻译中…
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.
翻译中…
样例
Input #1
2 4 6
Output #1
YES
Since $4-2 = 6-4$, this arrangement of poles is beautiful.
Input #2
2 5 6
Output #2
NO
Since $5-2 \neq 6-5$, this arrangement of poles is not beautiful.
Input #3
3 2 1
Output #3
YES
Since $1-2 = 2-3$, this arrangement of poles is beautiful.
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。