Indra is not very good at managing their money. They try to purchase items without checking their bank account, and don't know which purchase went through, or which ones failed. Could you write a program to help them?
Indra begins with dollars, and there are
events that occur in order: either Indra receives
their paycheck of
dollars, or tries to purchase an item worth
dollars. If Indra has less
than
dollars in their account, the purchase fails, and Indra loses no money.
Input
The first line contains integers and
, the starting money and the number of events respectively.
The following
lines contain each event, of the following form:
1 x
, which represents Indra receivingdollars
2 x
, which represents Indra attempting to purchase an item worth.
Output
For each purchase attempt, output a line containing SUCCEED
or FAIL
.
Constraints
Example 1
Input
3 10
1 5
1 4
2 6
1 1
2 3
2 4
2 9
2 9
1 4
1 4
Output
SUCCEED
SUCCEED
SUCCEED
FAIL
FAIL
Example 2
Input
1 10
2 3
1 5
1 2
1 5
1 5
2 5
2 9
1 2
1 2
1 2
Output
FAIL
SUCCEED
SUCCEED
Comments