Nine

AtCoder
IDabc309_a
Time2000ms
Memory256MB
Difficulty
We have the following $3 \times 3$ board with integers from $1$ through $9$ written on it. ![image](https://img.atcoder.jp/abc309/86862b285a60054303435965fe642c67.jpg) You are given two integers $A$ and $B$ between $1$ and $9$, where $A < B$. Determine if the two squares with $A$ and $B$ written on them are adjacent horizontally. ## Constraints * $1 \le A < B \le 9$ * $A$ and $B$ are integers. ## Input The input is given from Standard Input in the following format: $A$ $B$ [samples]
Samples
Input #1
7 8
Output #1
Yes

The two squares with $7$ and $8$ written on them are adjacent horizontally, so print `Yes`.
Input #2
1 9
Output #2
No
Input #3
3 4
Output #3
No
API Response (JSON)
{
  "problem": {
    "name": "Nine",
    "description": {
      "content": "We have the following $3 \\times 3$ board with integers from $1$ through $9$ written on it. ![image](https://img.atcoder.jp/abc309/86862b285a60054303435965fe642c67.jpg) You are given two integers $A$ a",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc309_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "We have the following $3 \\times 3$ board with integers from $1$ through $9$ written on it.\n![image](https://img.atcoder.jp/abc309/86862b285a60054303435965fe642c67.jpg)\nYou are given two integers $A$ a...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments