問題一覧 > 通常問題

No.3708 Uncommon Time

レベル : / AI推定難易度 : 130 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 1024 MB / 標準ジャッジ問題
タグ : (解説公開後に AC するまで非表示) / 解いたユーザー数 69
作問者 : UT0911 / テスター : sclara Rino-program 👑 AngrySadEight
お気に入りにしたユーザー ProblemId : 13596 / 自分の提出
問題文最終更新日: 2026-09-09 11:33:35
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 513 ゆーてぃーお誕生日コンテスト2026 (順位表) の他の問題:

Problem Statement

Yuti's birthday is month $9$, day $11$. Writing the month and the day in that order gives $911$, which is a prime number. Yuti has decided to look for other days that form prime numbers.

Given month $M$, day $D$, determine whether the number formed by writing $M$ and $D$ in that order is prime. If $D$ has $1$ digit, add a leading $0$ and treat it as having $2$ digits.

Constraints

  • All inputs are integers.
  • Month $M$, day $D$ follows the Gregorian calendar (the common calendar currently used around the world).

Input

$M$ $D$

Output

Print Yes if the number formed by writing $M$ and $D$ in that order is prime, and No if it is not prime.

Print a newline at the end.

Sample

Sample 1
Input
9 11
Output
Yes

This is the example from the problem statement. Since $911$ is prime, print Yes.

Sample 2
Input
1 2
Output
No

Since $102$ is not prime, print No.

Sample 3
Input
12 31
Output
Yes

Since $1231$ is prime, print Yes.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。