Dr. Cristina Yang is one of the best cardiologists in the world and you are her new student! To get you started, she has given you an easy task. You'll be given an example of how the heartbeat of a healthy heart looks in the form of a string $$$S$$$, and $$$N$$$ electrocardiograms, each one is a string $$$P$$$, your task is to say if it's healthy or not. A healthy electrocardiogram is one which is made by concatenating multiple times the string $$$S$$$.
In the first line a string $$$S$$$ ($$$1\leq |S| \leq 100$$$) the example of the healthy heart. In the second line a number $$$N$$$ ($$$1\leq N \leq 10^3 $$$)the number of electrocadiograms you have to examine. In the next $$$N$$$ lines a string $$$P$$$ ($$$1\leq |P| \leq 10^5$$$), the electrocardiogram to examine. It is assured that the sum of the lengths of the $$$N$$$ strings is less than $$$10^5$$$, and all strings are made of uppercase english characters.
Print $$$N$$$ lines, each one having either "Yes" or "No", corresponding to if the heart is healthy or not.
AB3ABABABAC
Yes No No
| Name |
|---|


