103450: [Atcoder]ABC345 A - Leftrightarrow

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

Description

Scoring: $100$ points

Problem Statement

You are given a string $S$ consisting of <, =, and >.
Determine whether $S$ is a bidirectional arrow string.
A string $S$ is a bidirectional arrow string if and only if there is a positive integer $k$ such that $S$ is a concatenation of one <, $k$ =s, and one >, in this order, with a length of $(k+2)$.

Constraints

  • $S$ is a string of length between $3$ and $100$, inclusive, consisting of <, =, and >.

Input

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

$S$

Output

If $S$ is a bidirectional arrow string, print Yes; otherwise, print No.


Sample Input 1

<====>

Sample Output 1

Yes

<====> is a concatenation of one <, four =s, and one >, in this order, so it is a bidirectional arrow string.
Hence, print Yes.


Sample Input 2

==>

Sample Output 2

No

==> does not meet the condition for a bidirectional arrow string.
Hence, print No.


Sample Input 3

<>>

Sample Output 3

No

Input

Output

评分:100分 部分 问题说明 你将得到一个由`<`、`=`和`>`组成的字符串$S$。 确定$S$是否为双向箭头字符串。 如果存在一个正整数$k$,使得$S$是按此顺序由一个`<`、$k$个`=`和一个`>`组成的字符串,长度为$(k+2)$,则称$S$为双向箭头字符串。 部分 约束 * $S$是一个长度在3到100之间的字符串,由`<`、`=`和`>`组成。 输入输出格式 输入 输入按以下格式从标准输入给出: $S$ 输出 如果$S$是双向箭头字符串,输出`Yes`;否则,输出`No`。 样例输入1 `<====>`

加入题单

上一题 下一题 算法标签: