Score : $300$ points
There are $N$ stations on a certain line operated by AtCoder Railway. The $i$-th station $(1 \leq i \leq N)$ from the starting station is named $S_i$.
Local trains stop at all stations, while express trains may not. Specifically, express trains stop at only $M \, (M \leq N)$ stations, and the $j$-th stop $(1 \leq j \leq M)$ is the station named $T_j$.
Here, it is guaranteed that $T_1 = S_1$ and $T_M = S_N$, that is, express trains stop at both starting and terminal stations.
For each of the $N$ stations, determine whether express trains stop at that station.
Input is given from Standard Input in the following format:
$N$ $M$ $S_1$ $\ldots$ $S_N$ $T_1$ $\ldots$ $T_M$
Print $N$ lines. The $i$-th line $(1 \leq i \leq N)$ should contain Yes
if express trains stop at the $i$-th station from the starting station, and No
otherwise.
5 3 tokyo kanda akiba okachi ueno tokyo akiba ueno
Yes No Yes No Yes
7 7 a t c o d e r a t c o d e r
Yes Yes Yes Yes Yes Yes Yes
Express trains may stop at all stations.