#abc360a. A - A Healthy Breakfast

A - A Healthy Breakfast

Score : 100100 points

问题陈述

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

他的桌子又长又窄,所以他把三盘菜排成一行。排列由字符串 SS 给出,其中从左边数第 ii 盘菜是米饭如果 SiS_iR,味噌汤如果 SiS_iM,沙拉如果 SiS_iS

确定米饭盘是否在味噌汤盘的左边。

以上为大语言模型 kimi 翻译,仅供参考。

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 SS, where the ii-th plate from the left is rice if SiS_i is R, miso soup if SiS_i is M, and salad if SiS_i is S.

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

Constraints

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

Input

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

SS

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.