------
## 最终结论
To solve the problem of determining whether it is possible to build a tower of dice such that the number of visible pips is exactly equal to each of Bob's favorite integers, we need to consider how the visible pips are calculated.

For a single die, the maximum number of visible pips is 21 (sum of all faces except the bottom face). When stacking multiple dice, each additional die will add a minimum of 14 pips and a maximum of 20 pips to the total visible pips. This is because for each additional die, one face (the bottom) becomes invisible and contributes 0 to the count, while the other five faces contribute between 14 and 20 pips.

Given this understanding, we can derive that for any integer \( x \), it is possible to achieve exactly \( x \) visible pips if and only if:
- \( x \geq 14 \) (since with one die you can have at least 14 visible pips)
- \( x = 14 + 7k \) for some non-negative integer \( k \)

This is because:
- The first die contributes at least 14 pips.
- Each additional die contributes an increment that allows us to reach any number that is a multiple of 7 more than some base number.

Therefore, we can determine if it's possible to achieve exactly \( x_i \) visible pips by checking if:
1. \( x_i \geq 14 \)
2. \( (x_i - 14) \% 7 == 0 \)

Here is the Python code implementing this logic:

```python
# Read input
t = int(input().strip())
favorite_integers = list(map(int, input().strip().split()))

def can_build_tower(t, favorite_integers):
    results = []
    for x in favorite_integers:
        if x >= 14 and (x - 14) % 7 == 0:
            results.append("YES")
        else:
            results.append("NO")
    return results

# Get the results
results = can_build_tower(t, favorite_integers)

# Print the results
for result in results:
    print(result)
```

This code reads Bob's favorite integers and determines for each one whether it's possible to construct a tower with exactly that many visible pips using the constraints and calculations described above.