Under construction

Still being built. Things may change

Three Consecutive

Time limit2sMemory limit1024 MB

Summary
Given a string of 'o' and 'x' characters, the task is to check whether three 'o' characters appear consecutively.
Level

Easy2 of 10

Topics
String, Implementation
Solved
No attempts yet

Problem

A string S of length N is given. Each character of S is either o or x.

Print Yes on one line if S has three o characters in a row. Otherwise, print No.

An o may be adjacent to a run of three o characters.

Input

The input is given in the following format.

N
S

Output

Print Yes if S contains three o characters in a row. Otherwise, print No.

Constraints

  • 1 ≦ N ≦ 100 000.
  • S is a string of length N.
  • Each character of S is o or x.
  • N is an integer.

Examples5

  1. Example 1

    Input
    5
    oxooo
    
    Expected output
    Yes
    
  2. Example 2

    Input
    5
    xooxo
    
    Expected output
    No
    
  3. Example 3

    Input
    1
    o
    
    Expected output
    No
    
  4. Example 4

    Input
    10
    oooooooooo
    
    Expected output
    Yes
    
  5. Example 5

    Input
    20
    xooxxoooxoxooxooxoox
    
    Expected output
    Yes