Given a tree with $n$ nodes, rooted at 1.
Perform $q$ queries. Each query provides a sequence, and you need to determine if it is a possible subsequence of a BFS order of the tree.
The definition of a BFS order here is: maintain a queue, initially containing the root. Each time an element $u$ is popped, push all of its children into the queue in some order.
The BFS order can be different for different queries; that is, the queries are independent.
Input
The first line contains a single positive integer $n$.
The second line contains $n - 1$ positive integers, representing the parents of nodes 2 through $n$. It is guaranteed that the parent of a node has a smaller index than the node itself.
The next line contains a single positive integer $q$, representing the number of queries.
The following $q$ lines each start with a positive integer $m$, representing the length of the query sequence, followed by $m$ positive integers representing the query sequence.
Note that the nodes in the query sequence may contain duplicates.
$1 \le n \le 3 \times 10^5$, $1 \le q, \sum m \le 5 \times 10^5$.
Output
Output $q$ lines, each containing either Yes or No, representing your answer.
Case-insensitive.
Examples
Input 1
6 1 1 3 2 4 10 4 3 6 2 5 1 4 3 2 4 5 5 2 5 4 6 3 3 1 4 2 3 5 6 3 5 4 5 2 6 1 4 4 3 2 5 4 4 6 2 3 3 3 2 6
Output 1
No Yes Yes No No No No No No Yes