KEYENCE String

AtCoder
IDkeyence2019_b
Time2000ms
Memory256MB
Difficulty
A string is called a KEYENCE string when it can be changed to `keyence` by removing its contiguous substring (possibly empty) only once. Given a string $S$ consisting of lowercase English letters, determine if $S$ is a KEYENCE string. ## Constraints * The length of $S$ is between $7$ and $100$ (inclusive). * $S$ consists of lowercase English letters. ## Input Input is given from Standard Input in the following format: $S$ [samples]
Samples
Input #1
keyofscience
Output #1
YES

`keyence` is an abbreviation of `key of science`.
Input #2
mpyszsbznf
Output #2
NO
Input #3
ashlfyha
Output #3
NO
Input #4
keyence
Output #4
YES
API Response (JSON)
{
  "problem": {
    "name": "KEYENCE String",
    "description": {
      "content": "A string is called a KEYENCE string when it can be changed to `keyence` by removing its contiguous substring (possibly empty) only once. Given a string $S$ consisting of lowercase English letters, det",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "keyence2019_b"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "A string is called a KEYENCE string when it can be changed to `keyence` by removing its contiguous substring (possibly empty) only once.\nGiven a string $S$ consisting of lowercase English letters, det...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments