103600: [Atcoder]ABC360 A - A Healthy Breakfast

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:5 Solved:0

Description

Score : $100$ points

Problem Statement

Takahashi eats three plates for breakfast: rice, miso soup, and salad.

His table is long and narrow, so he arranged the three plates in a row. The arrangement is given by a string $S$, where the $i$-th plate from the left is rice if $S_i$ is R, miso soup if $S_i$ is M, and salad if $S_i$ is S.

Determine whether the plate of rice is to the left of the plate of miso soup.

Constraints

  • $|S| = 3$
  • $S$ contains one R, one M, and one S.

Input

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

$S$

Output

Print Yes if the plate of rice is to the left of the plate of miso soup, and No otherwise.


Sample Input 1

RSM

Sample Output 1

Yes

The plate of rice is at the 1st position from the left, and the plate of miso soup is at the 3rd position from the left. Since the plate of rice is to the left, print Yes.


Sample Input 2

SMR

Sample Output 2

No

The plates are arranged as salad, miso soup, and rice from left to right.

Output

得分:$100$分

问题陈述

高桥早餐吃三盘食物:米饭、味噌汤和沙拉。

他的桌子又长又窄,所以他把三盘食物排成一行。这个排列由一个字符串$S$给出,其中从左边数起第$i$个盘子如果是米饭,则$S_i$是R,如果是味噌汤,则$S_i$是M,如果是沙拉,则$S_i$是S

判断米饭盘子是否在味噌汤盘子左边。

约束条件

  • $|S| = 3$
  • $S$ 包含一个 R,一个 M,和一个 S

输入

输入从标准输入以以下格式给出:

$S$

输出

如果米饭盘子在味噌汤盘子左边,打印Yes,否则打印No


示例输入 1

RSM

示例输出 1

Yes

米饭盘子从左边起是第1个位置,味噌汤盘子是第3个位置。因为米饭盘子在左边,所以打印Yes


示例输入 2

SMR

示例输出 2

No

盘子从左到右的排列是沙拉、味噌汤和米饭。

加入题单

算法标签: