第 042 场 AtCoder Beginner Contest
A
伊吕波与俳句(ABC 版)
Iroha and Haiku (ABC Edition)
AtCoder
⌀ 0
原题
←B →

伊吕波与俳句(ABC 版)AI (CI翻译)

Problem Statement

题目描述

AI (CI翻译)

Iroha loves Haiku. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with $5$, $7$ and $5$ syllables, in this order.

伊吕波喜欢 俳句。俳句是一种简短的日本诗歌形式,由三个短语组成,按顺序分别有 $5$、$7$ 和 $5$ 个音节。AI (CI翻译)

To create a Haiku, Iroha has come up with three different phrases. These phrases have $A$, $B$ and $C$ syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.

伊吕波想出了三个不同的短语,它们分别有 $A$、$B$ 和 $C$ 个音节。请判断她能否以某种顺序各使用一次这三个短语,组成一首俳句。AI (CI翻译)

Constraints

约束条件

AI (CI翻译)
  • $1≦A,B,C≦10$
  • $1≦A,B,C≦10$
AI (CI翻译)

Input

输入格式

AI (CI翻译)

The input is given from Standard Input in the following format:

输入从标准输入按以下格式给出:AI (CI翻译)

A B C

A B C
AI (CI翻译)

Output

输出格式

AI (CI翻译)

If it is possible to construct a Haiku by using each of the phrases once, print YES (case-sensitive). Otherwise, print NO.

如果可以各使用一次这三个短语组成一首俳句,输出 YES(区分大小写);否则输出 NO。AI (CI翻译)

样例

Input #1
5 5 7
Output #1
YES
Using three phrases of length $5$, $5$ and $7$, it is possible to construct a Haiku.
Input #2
7 7 5
Output #2
NO
题目信息
题号
abc042_a
时间限制
2 s
内存限制
256 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(gpt-6.1-sol),如有出入请以原文为准。