Preparing NOJ

# Hearthstone So Easy

1000ms 262144K

## Description:

Hearthstone is a turn-based card game. The game flow of each round is: Player 1 draws card $\Rightarrow$player 1 plays cards $\Rightarrow$player 2 draws card $\Rightarrow$player 2 plays cards.

We simplify the game logic as follows:

• During each player's draw stage, the player attempts to draw a card from his or her deck.
• During each player's playing stage, the player can choose:
1. to increase his/her health by $k$ points. Note that there is no upper limit on health.
2. to reduce the opponent's health by $k$ points.

When there are no cards in the player's card deck, the player will enter a state of fatigue. At this time, the player will increase his/her fatigue value by one every times he/she tries to draw a card, and then deduct the amount of health by the fatigue value. The fatigue value of each player is initially $0$ points.

pllj and freesin like playing hearthstone very much. In a certain game, both players have no cards in their decks, and both the fatigue points are $0$ points, and the health points are both $n$ points. When a player's health is less than or equal to $0$, the player immediately loses the game.

At this time, it's pllj's turn to draw card. Both players are very smart, so they play the game optimally. Who will be the winner? Please output his name.

## Input:

The first line contains a single integer $t$ ($1 \leq t \leq 10^5$), which represents the number of data cases.

Each group of data is a row of two positive integers $n,k$ separated by spaces ($1 \leq n,k\leq 10^9$), of which meaning is described before.

## Output:

For each case of data, output a line of string pllj or freesin to indicate the winner.

## Sample Input:

2
10 9
5 3


## Sample Output:

pllj
freesin


## Note:

For the first data case:

• pllj's draw stage: pllj tries to draw cards from a empty deck. His fatigue value increases by $1$ to become $1$, and then pllj's health deducts by one point, leaving $9$ health points.
• pllj's playing stage: pllj causes $9$ points of damage to freesin. After this time, freesin has $1$ point of life left.
• freesin's draw stage: freesin tries to draw cards from a empty deck. His fatigue value increases by $1$ to become $1$, and then freesin's health deducts by one point, leaving $0$ points. At this time, freesin loses the game.

Info

Provider CodeForces Gym

Code GYM103366H

Tags

Submitted 0

Passed 0

AC Rate 0%

Date 10/25/2021 22:31:59

Related

Nothing Yet