Under construction

Still being built. Things may change

Build the String

Time limit1sMemory limit1024 MB

Summary
Given a string of length N up to 10, the task is to check whether the substring gori appears in it and print YES or NO.
Level

Easy1 of 10

Topics
String, String matching
Solved
No attempts yet

Problem

Hoban-woo considers that gori is derived from a string when gori appears in it as a contiguous substring. Given one string of length NN, determine whether gori is derived from that string by Hoban-woo's rule.

Input

The first line contains the length NN of the string. (4≤N≤10)(4 \leq N \leq 10)

The second line contains the string SS of length NN. The string consists only of lowercase English letters.

Output

If gori is derived from the given string, print YES. Otherwise, print NO.

Hint

A contiguous substring is a string left after removing any number of characters from the start and the end of the original string. Removing no characters from either end is also allowed.

Examples2

  1. Example 1

    Input
    9
    algorithm
    
    Expected output
    YES
    
  2. Example 2

    Input
    8
    ggoorrii
    
    Expected output
    NO