Problem: You are at your grandparents' house and you are playing an old video game on a strange console. Your controller has only two buttons and each button has a number written on it.
Initially, your score is . The game is composed of rounds. For each , the -th round works as follows.
On the screen, a symbol appears, which is either (plus) or (minus). Then you must press one of the two buttons on the controller once. Suppose you press a button with the number written on it: your score will increase by if the symbol was and will decrease by if the symbol was . After you press the button, the round ends.
After you have played all rounds, you win if your score is .
Over the years, your grandparents bought many different controllers, so you have of them. The two buttons on the -th controller have the numbers and written on them. For each controller, you must compute whether you can win the game playing with that controller.
Input Format: The first line contains a single integer () — the number of rounds.
The second line contains a string of length — where is the symbol that will appear on the screen in the -th round. It is guaranteed that contains only the characters and .
The third line contains an integer () — the number of controllers.
The following lines contain two integers and each () — the numbers on the buttons of controller .
Output Format: Output lines. On line print if the game is winnable using controller , otherwise print .
Note: In the first sample, one possible way to get score using the first controller is by pressing the button with numnber in rounds , , , , and , and pressing the button with number in rounds and . It is possible to show that there is no way to get a score of using the second controller.