Cups and Beans

아직 제출이 없습니다시간 제한1초메모리 제한256 MB

문제

There are NN cups numbered 0 through N1N-1. For each i(1iN1)i (1 \leq i \leq N-1), the cup ii contains A_iA\_i beans, and this cup is labeled with an integer C_iC\_i.

Two people will play the following game:

  • In each turn, the player chooses a bean from one of the cups except for the cup 00.
  • If he chooses a bean from the cup ii, he must move it to one of the cups iC_i,,i1i-C\_i, \ldots, i-1.
  • The players take turns alternately. If a player can't choose a bean, he loses.

Who will win if both players play optimally?

입력

NN
C_1C\_1 A_1A\_1
C_2C\_2 A_2A\_2
\vdots
C_N1C\_{N-1} A_N1A\_{N-1}

출력

Print the name of the winner: "First" or "Second".

제한

  • 2N1052 \leq N \leq 10^5
  • 1C_ii1 \leq C\_i \leq i
  • 0A_i1090 \leq A\_i \leq 10^9
  • At least one of A_iA\_i is nonzero.
  • All values in the input are integers.

힌트

Notes to the Sample 1:

  • In the first turn, the first player must move a bean from 22 to 11.
  • In the second turn, the second player must move a bean from 11 to 00.
  • In the third turn, the first player can't choose a bean and loses.