This page is still under construction.

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

Seongtaek's Secret Password

Time limit1sMemory limit1024 MB

Summary
Given N strings, the task is to print yes for each string whose length is between 6 and 9 characters, otherwise no.
Level

Easy1 of 10

Topics
String, Implementation
Solved
No attempts yet

Problem

Seongtaek, a student at Busan Cyber University, has to check whether a given string can be used as the password for the front door, at his mother's request. He has to study, so let's help him!

The rules for a usable password are as follows.

  1. A password must be at least 6 characters and at most 9 characters long.

For example, 123124 is a valid password, and 1202727161 is an invalid one. Given a string, determine whether it can be used as the front door password.

Input

The first line contains the number of strings NN.

From the second line onward, each of the next NN lines contains one string made only of digits and English uppercase and lowercase letters.

Output

For each string, print yes if it can be used as a password, otherwise print no.

Constraints

  • 1≤N≤1 0001\leq N \leq 1\,000
  • Each string has a length of at least 1 and at most 20.

Examples1

  1. Example 1

    Input
    3
    1245125
    asdij
    120318739721
    
    Expected output
    yes
    no
    no