We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.

- All Contests
- HourRank 16
- Lucky Numbers

# Lucky Numbers

# Lucky Numbers

Leonardo thinks and are *lucky* digits! He defines a number as *lucky* if it can be represented as the sum of one or more of these lucky digits. For example, he considers the following numbers to be lucky:

You are given queries, where each query consists of a long integer denoting . For each query, print `Yes`

on a new line if is a lucky number; otherwise, print `No`

.

**Input Format**

The first line contains an integer denoting .

Each of the subsequent lines contains a long integer describing the value of for a query.

**Constraints**

**Subtasks**

- for of the maximum score

**Output Format**

For each query, print `Yes`

on a new line if is a lucky number; otherwise, print `No`

.

**Sample Input**

```
4
1
4
11
17
```

**Sample Output**

```
No
Yes
Yes
No
```

**Explanation**

We perform the following queries:

- can't be represented as a sum of 's and 's, so we print
`No`

on a new line. - is a lucky digit (which means it's also a lucky number), so we print
`Yes`

on a new line. - can be represented as , so we print
`Yes`

on a new line. - can't be represented as a sum of 's and 's, so we print
`No`

on a new line.