#abc308a. A - New Scheme

A - New Scheme

Score : 100100 points

问题描述

给定八个整数 S1,S2,,S8S_1,S_2,\dots,S_8,如果它们满足以下三个条件,则输出 Yes,否则输出 No

  • 序列 (S1,S2,,S8)(S_1,S_2,\dots,S_8) 是单调非减的。换句话说,S1S2S8S_1 \leq S_2 \leq \dots \leq S_8
  • S1,S2,,S8S_1,S_2,\dots,S_8 均在 100100675675(包含)之间。
  • S1,S2,,S8S_1,S_2,\dots,S_8 都是 2525 的倍数。

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

Given eight integers S1,S2,S_1,S_2,\dots, and S8S_8, print Yes if they satisfy all of the following three conditions, and No otherwise.

  • The sequence (S1,S2,,S8)(S_1,S_2,\dots,S_8) is monotonically non-decreasing. In other words, S1S2S8S_1 \leq S_2 \leq \dots \leq S_8.
  • S1,S2,S_1,S_2,\dots, and S8S_8 are all between 100100 and 675675, inclusive.
  • S1,S2,S_1,S_2,\dots, and S8S_8 are all multiples of 2525.

Constraints

  • 0Si10000\leq S_i \leq 1000
  • All input values are integers.

Input

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

S1S_1 S2S_2 \dots S8S_8

Output

Print the answer.

Sample Input 1

125 175 250 300 400 525 600 650

Sample Output 1

Yes

They satisfy all of the three conditions.

Sample Input 2

100 250 300 400 325 575 625 675

Sample Output 2

No

They violate the first condition because S4>S5S_4 > S_5.

Sample Input 3

0 23 24 145 301 413 631 632

Sample Output 3

No

They violate the second and third conditions.

update @ 2024/3/10 08:43:25