This page is still under construction.

Parts of this page are still being built. What you see may change.

Complex String

Interview

Time limit2sMemory limit1024 MB

Summary
Given a string of length N over the letters A through E, decide whether at least 3 distinct characters appear.
Level

Easy1 of 10

Topics
String, Implementation
Solved
No attempts yet

Problem

You are given a string S of length N. Each character of S is one of A, B, C, D, E.

If at least 3 distinct characters appear in S, print Yes; otherwise, print No.

Input

Input is given from standard input in the following format.

N
S

Output

If at least 3 distinct characters appear in S, print Yes; otherwise, print No.

Constraints

  • 1 ≤ N ≤ 100.
  • S is a string of length N.
  • Each character of S is one of A, B, C, D, E.
  • N is an integer.

Examples4

  1. Example 1

    Input
    4
    BABE
    
    Expected output
    Yes
    
  2. Example 2

    Input
    3
    DAD
    
    Expected output
    No
    
  3. Example 3

    Input
    5
    BACED
    
    Expected output
    Yes
    
  4. Example 4

    Input
    28
    EEEEEEEEEEEEEEEEEEEEEEEEEEEE
    
    Expected output
    No