← Back to the problem

Kazakhstan FAIO 2024 · Statement

G. Into Space

Formatted by IOAI Training from the original (BeksultanSagyndyk/faio-tasks, licence Apache-2.0). The original is authoritative.

https://contest.yandex.ru/contest/71291/problems/G/

Time limit: 1 second
Memory limit: 64 MB
Input: standard input or input.txt
Output: standard output or output.txt

The team needs to place 4 magnets in a single plane. For them to operate smoothly, all pairwise distances between the magnets must be natural numbers (a, b, c, d, e, f) (in meters). They are unsure whether this is possible—help them decide.

Input
One line with six natural numbers (in meters):
a b c d e f

Output
If such a placement is possible, print "yes". Otherwise, print "no".