Технокубок 2018 - Отборочный Раунд 3
A
ACM ICPC
Codeforces
1000
原题
←B →
翻译中…

In a small but very proud high school it was decided to win ACM ICPC. This goal requires to compose as many teams of three as possible, but since there were only $6$ students who wished to participate, the decision was to build exactly two teams.

翻译中…

After practice competition, participant number $*i*$ got a score of $*a*_{*i*}$. Team score is defined as sum of scores of its participants. High school management is interested if it's possible to build two teams with equal scores. Your task is to answer that question.

翻译中…

Input

翻译中…

The single line contains six integers $*a*_{1}, ..., *a*_{6}$ ($0 ≤ *a*_{*i*} ≤ 1000$) — scores of the participants

翻译中…

Output

翻译中…

Print "YES" (quotes for clarity), if it is possible to build teams with equal score, and "NO" otherwise.

翻译中…

You can print each character either upper- or lowercase ("YeS" and "yes" are valid when the answer is "YES").

翻译中…

Note

翻译中…

In the first sample, first team can be composed of $1$st, $2$nd and $6$th participant, second — of $3$rd, $4$th and $5$th: team scores are $1 + 3 + 1 = 2 + 1 + 2 = 5$.

翻译中…

In the second sample, score of participant number $6$ is too high: his team score will be definitely greater.

翻译中…

样例

Input #1
1 3 2 1 2 1
Output #1
YES
InputCopy OutputCopy
Input #2
1 1 1 1 1 99
Output #2
NO
InputCopy OutputCopy
题目信息
题号
886A
时间限制
2 s
内存限制
256 MB
标签
暴力

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。