Two players are playing a game on a $15\times15$ chessboard. The rules of the game are as follows:

The game starts with a single coin located at some $x,y$ coordinates. The coordinates of the upper left cell are $(1,1)$, and of the lower right cell are $(15,15)$.

In each move, a player must move the coin from cell $(x,y)$ to one of the following locations:

$(x-2,y+1)$ 
$(x-2,y-1)$ 
$(x+1,y-2)$ 
$(x-1,y-2)$

Note: The coin must remain inside the confines of the board.

Beginning with player 1, the players alternate turns. The first player who is unable to make a move loses the game.

The figure below shows all four possible moves using an $8\times8$ board for illustration:

Given the initial coordinates of the players' coins, assuming optimal play, determine which player will win the game. 

Function Description

Complete the chessboardGame function in the editor below.  It should return a string, either First or Second.

chessboardGame has the following parameter(s):  

x: an integer that represents the starting column position   
y: an integer that represents the starting row position  

Input Format

The first line contains an integer $\boldsymbol{\boldsymbol{t}}$, the number of test cases. 

Each of the next $\boldsymbol{\boldsymbol{t}}$ lines contains $2$ space-separated integers $\boldsymbol{x}$ and $y$.

Constraints

$1\leq t\leq225$
$1\leq x[i],y[i]\leq15$

Output Format

On a new line for each test case, print $\textbf{First}$ if the first player is the winner.  Otherwise, print $\textbf{Second}$.

Sample Input
3
5 2
5 3
8 8

Sample Output
Second
First
First

Explanation

In the first case, player1 starts at the red square and can move to any of the blue squares.  Regardless of which one is chosen, the player 2 can move to one of the green squares to win the game.

In the second case, player 1 starts at the red square and can move to any of the blue squares or the purple one.  Moving to the purple one limits player 2 to the yellow square.  From the yellow square, player 1 moves to the green square and wins.

Difficulty: EASY
Tags: Game theory

Starter code:

Solutions:
import copy
move = [(-2, 1), (-2, -1), (1, -2), (-1, -2)]
grid_copy = set()
for i in range(1, 16):
	for j in range(1, 16):
		grid_copy.add((i, j))
First = set()
Second = set()
t = 0
while len(First) + len(Second) != 225:
	if t % 2 == 0:
		for (i, j) in grid_copy:
			n = 0
			for (x, y) in move:
				if (i + x, j + y) not in grid_copy or (i + x, j + y) in First:
					n += 1
			if n == 4:
				Second.add((i, j))
	else:
		for (i, j) in grid_copy:
			for (x, y) in move:
				if (i + x, j + y) in Second:
					First.add((i, j))
	t += 1
test = int(input())
for _ in range(test):
	(x, y) = map(int, input().strip().split())
	if (x, y) in First:
		print('First')
	else:
		print('Second')


for t in range(int(input())):
	(x, y) = [int(a) - 1 for a in input().split()]
	if x // 2 % 2 == 0 and y // 2 % 2 == 0:
		print('Second')
	else:
		print('First')


import functools

@functools.lru_cache(maxsize=(15 + 2) ** 2)
def win(i, j):
	return not (1 <= i <= 15 and 1 <= j <= 15 and all((win(i + di, j + dj) for (di, dj) in [(-2, 1), (-2, -1), (1, -2), (-1, -2)])))
for test in range(int(input())):
	print('second first'.split()[win(*map(int, input().split()))].capitalize())
for i in range(1, 1 + 15):
	for j in range(1, 1 + 15):
		if win(i, j) != (not {i % 4, j % 4} <= {1, 2}):
			print(i, j)


n = int(input())
for i in range(n):
	(x, y) = map(int, input().split())
	if x % 4 == 0 or y % 4 == 0 or (x + 1) % 4 == 0 or ((y + 1) % 4 == 0):
		print('First')
	else:
		print('Second')


a = int(input())
for i in range(a):
	s = input()
	s = s.split(' ')
	x = int(s[0])
	y = int(s[1])
	if x % 4 == 0 or x % 4 == 3 or y % 4 == 0 or (y % 4 == 3):
		print('First')
	else:
		print('Second')


grids = [[None] * 15 for _ in range(15)]
grids[0][0] = False
grids[0][1] = False
grids[1][0] = False
grids[1][1] = False

def DFS(grids, x, y):
	if x < 0 or x >= 15 or y < 0 or (y >= 15):
		return -1
	isWin = grids[x][y]
	if isWin == None:
		isWin = DFS(grids, x - 2, y + 1) == False or DFS(grids, x - 2, y - 1) == False or DFS(grids, x + 1, y - 2) == False or (DFS(grids, x - 1, y - 2) == False)
	grids[x][y] = isWin
	return isWin
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	print('First' if DFS(grids, x - 1, y - 1) else 'Second')


import sys
dic = {}

def call(x, y):
	if x < 1 or y < 1 or x > 15 or (y > 15):
		return 1
	if (x, y) in dic:
		return dic[x, y]
	state = 1
	state = state and call(x - 1, y - 2)
	state = state and call(x + 1, y - 2)
	state = state and call(x - 2, y - 1)
	state = state and call(x - 2, y + 1)
	dic[x, y] = int(state == 0)
	return dic[x, y]
t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	if call(x, y) == 0:
		print('Second')
	else:
		print('First')


def fun():
	mat = [[0 for i in range(15)] for j in range(15)]
	mat[0][0] = 0
	mat[0][1] = 0
	mat[1][0] = 0
	for i in range(2, 15):
		k = i
		for j in range(i + 1):
			if 0 <= j - 2 < 15 and 0 <= k + 1 < 15:
				if mat[j - 2][k + 1] == 0:
					mat[j][k] = 1
					k -= 1
					continue
			if 0 <= j - 2 < 15 and 0 <= k - 1 < 15:
				if mat[j - 2][k - 1] == 0:
					mat[j][k] = 1
					k -= 1
					continue
			if 0 <= j + 1 < 15 and 0 <= k - 2 < 15:
				if mat[j + 1][k - 2] == 0:
					mat[j][k] = 1
					k -= 1
					continue
			if 0 <= j - 1 < 15 and 0 <= k - 2 < 15:
				if mat[j - 1][k - 2] == 0:
					mat[j][k] = 1
					k -= 1
					continue
			k -= 1
	for i in range(1, 15):
		k = 14
		for j in range(i, 15):
			if 0 <= j - 2 < 15 and 0 <= k + 1 < 15:
				if mat[j - 2][k + 1] == 0:
					mat[j][k] = 1
					k -= 1
					continue
			if 0 <= j - 2 < 15 and 0 <= k - 1 < 15:
				if mat[j - 2][k - 1] == 0:
					mat[j][k] = 1
					k -= 1
					continue
			if 0 <= j + 1 < 15 and 0 <= k - 2 < 15:
				if mat[j + 1][k - 2] == 0:
					mat[j][k] = 1
					k -= 1
					continue
			if 0 <= j - 1 < 15 and 0 <= k - 2 < 15:
				if mat[j - 1][k - 2] == 0:
					mat[j][k] = 1
					k -= 1
					continue
			k -= 1
	return mat
res = fun()
t = int(input())
while t != 0:
	t -= 1
	(x, y) = [int(i) for i in input().split()]
	if res[x - 1][y - 1] == 1:
		print('First')
	else:
		print('Second')


t = int(input().strip())
for each in range(t):
	(x, y) = [int(i) for i in input().strip().split(' ')]
	if y % 4 in (1, 2) and x % 4 in (1, 2):
		print('Second')
	else:
		print('First')


import sys

def ints():
	return map(int, sys.stdin.readline().split())

def solve(point, cache={}):
	if point in cache:
		return cache[point]
	(x, y) = point
	moves = [(x - 2, y + 1), (x - 2, y - 1), (x + 1, y - 2), (x - 1, y - 2)]
	valid_moves = []
	for (x_, y_) in moves:
		if x_ >= 1 and x_ <= 15 and (y_ >= 1) and (y_ <= 15):
			valid_moves += [(x_, y_)]
	ans = False
	for move in valid_moves:
		ans = ans or not solve(move, cache)
	cache[point] = ans
	return ans
[t] = ints()
for i in range(0, t):
	[x, y] = ints()
	if solve((x, y)):
		print('First')
	else:
		print('Second')


t = int(input())
l = []
for x in range(1, 16):
	for y in range(1, 16):
		l.append((x, y))
grundy = dict.fromkeys(l)

def chess(x, y):
	if 1 <= x <= 15 and 1 <= y <= 15:
		if grundy[x, y] is None:
			l = [(x - 2, y - 1), (x - 2, y + 1), (x + 1, y - 2), (x - 1, y - 2)]
			flag = 0
			for tup in l:
				flag += chess(tup[0], tup[1])
			if flag == 4:
				grundy[x, y] = 0
				return 0
			else:
				grundy[x, y] = 1
				return 1
		else:
			return grundy[x, y]
	else:
		return 1
for ii in range(t):
	(x, y) = map(int, input().split())
	ans = chess(x, y)
	if ans == 0:
		print('Second')
	else:
		print('First')


(r, f) = (['Second', 'First'], lambda x: int(x) % 4)
for i in range(int(input())):
	(x, y) = map(f, input().split())
	print(r[not y or y == 3 or x == 3 or (not x)])


import sys
t = int(input().strip())
res = 0
for line in sys.stdin:
	res = line.rstrip('\n')
	data = res.split(' ')
	x = int(data[0]) % 4
	y = int(data[1]) % 4
	if y == 0 or y == 3 or x == 0 or (x == 3):
		print('First')
	else:
		print('Second')


chessboard = [[False for _ in range(15)] for _ in range(15)]
for level in range(29):
	for i in range(min(level, 14), max(0, level - 14) - 1, -1):
		j = level - i
		chessboard[i][j] = i >= 2 and j >= 1 and (not chessboard[i - 2][j - 1]) or (i >= 1 and j >= 2 and (not chessboard[i - 1][j - 2])) or (i >= 2 and j < 14 and (not chessboard[i - 2][j + 1])) or (i < 14 and j >= 2 and (not chessboard[i + 1][j - 2]))
for _ in range(int(input())):
	(i, j) = map(lambda x: int(x) - 1, input().split())
	print(['Second', 'First'][chessboard[i][j]])


dic = {}
dic[1, 1] = dic[1, 2] = dic[2, 1] = dic[2, 2] = False
cross = [(1, 1), (1, 2), (2, 1), (2, 2)]
while len(dic) < 225:
	put = []
	add = [(2, -1), (2, 1), (-1, 2), (1, 2)]
	for i in cross:
		for j in add:
			if i[0] + j[0] <= 15 and i[1] + j[1] <= 15 and (i[0] + j[0] > 0) and (i[1] + j[1] > 0):
				dic[i[0] + j[0], i[1] + j[1]] = True
				put.append((i[0] + j[0], i[1] + j[1]))
	put = set(put)
	temp_cross = []
	for i in put:
		for j in add:
			if i[0] + j[0] <= 15 and i[1] + j[1] <= 15 and (i[0] + j[0] > 0) and (i[1] + j[1] > 0):
				if (i[0] + j[0], i[1] + j[1]) not in dic:
					temp_cross.append((i[0] + j[0], i[1] + j[1]))
	temp_cross = set(temp_cross)
	cross = []
	for i in temp_cross:
		count = 0
		for j in add:
			if i[0] - j[0] <= 15 and i[1] - j[1] <= 15 and (i[0] - j[0] > 0) and (i[1] - j[1] > 0):
				if (i[0] - j[0], i[1] - j[1]) in dic and dic[i[0] - j[0], i[1] - j[1]] == True:
					count += 1
			else:
				count += 1
		if count == 4:
			dic[i[0], i[1]] = False
			cross.append((i[0], i[1]))
T = int(input())
for _ in range(T):
	(m, n) = map(int, input().split())
	if dic[m, n] == False:
		print('Second')
	else:
		print('First')


def not_poss(x, y):
	if x < 1 or x > 15 or y < 1 or (y > 15):
		return True
	else:
		return not (not_poss(x - 2, y + 1) and not_poss(x - 2, y - 1) and not_poss(x + 1, y - 2) and not_poss(x - 1, y - 2))
t = int(input())
while t > 0:
	coin = input().split(' ')
	coin = [int(x) for x in coin]
	if not_poss(coin[0], coin[1]):
		print('First')
	else:
		print('Second')
	t = t - 1


DIM = 15

def getSuccessors(i, j):
	successors = []
	if i + 1 < DIM and j - 2 >= 0:
		successors.append((i + 1, j - 2))
	if i - 1 >= 0 and j - 2 >= 0:
		successors.append((i - 1, j - 2))
	if i - 2 >= 0 and j + 1 < DIM:
		successors.append((i - 2, j + 1))
	if i - 2 >= 0 and j - 1 >= 0:
		successors.append((i - 2, j - 1))
	return successors
t = int(input().strip())
board = [[False] * DIM for _ in range(DIM)]
for k in range(2 * DIM - 1):
	i = 0
	j = k
	while j >= 0 and i < DIM:
		if j < DIM:
			for (si, sj) in getSuccessors(i, j):
				if not board[si][sj]:
					board[i][j] = True
					break
		i += 1
		j -= 1
for _ in range(t):
	(i, j) = input().strip().split(' ')
	(i, j) = [int(i) - 1, int(j) - 1]
	print('First' if board[i][j] else 'Second')


import sys

def solve(x, y, player):
	if x < 1 or x > 15 or y < 1 or (y > 15):
		return -1
	result = player
	player = (player + 1) % 2
	first = solve(x - 2, y + 1, player)
	if first != -1 and first != player:
		return first
	second = solve(x - 2, y - 1, player)
	if second != -1 and second != player:
		return second
	third = solve(x + 1, y - 2, player)
	if third != -1 and third != player:
		return third
	fourth = solve(x - 1, y - 2, player)
	if fourth != -1 and fourth != player:
		return fourth
	return player
t = int(input().strip())
players = ('First', 'Second')
for i in range(t):
	(x, y) = input().strip().split()
	(x, y) = (int(x), int(y))
	print(players[solve(x, y, 0)])


moves = [(-2, +1), (-2, -1), (+1, -2), (-1, -2)]

def is_valid(x, y):
	return x >= 1 and x <= 15 and (y >= 1) and (y <= 15)
win = {}
for dist in range(2, 31):
	for x in range(1, 16):
		y = dist - x
		if is_valid(x, y):
			win[x, y] = False
			for (dx, dy) in moves:
				if is_valid(x + dx, y + dy) and win[x + dx, y + dy] == False:
					win[x, y] = True
assert (15, 15) in win
for _ in range(int(input())):
	(x, y) = [int(x) for x in input().split()]
	if win[x, y]:
		print('First')
	else:
		print('Second')


loserino = []
win = []
for i in range(1, 16):
	for j in range(1, 16):
		lost = True
		for k in [[-2, +1], [-2, -1], [+1, -2], [-1, -2]]:
			l = i + k[0]
			m = j + k[1]
			if l > 0 and l < 16 and (m > 0) and (m < 16):
				lost = False
				break
		if lost:
			loserino.append([i, j])
modified = True
while modified:
	modified = False
	for i in range(1, 16):
		for j in range(1, 16):
			if [i, j] in loserino or [i, j] in win:
				continue
			validmoves = 0
			won = False
			winerinos = 0
			for k in [[-2, +1], [-2, -1], [+1, -2], [-1, -2]]:
				l = i + k[0]
				m = j + k[1]
				if l > 0 and l < 16 and (m > 0) and (m < 16):
					validmoves += 1
				if [l, m] in loserino:
					win.append([i, j])
					modified = True
					won = True
					break
				if [l, m] in win:
					winerinos += 1
			if won:
				continue
			if winerinos != 0 and winerinos == validmoves:
				loserino.append([i, j])
				modified = True
for i in range(int(input())):
	posicio = [int(x) for x in input().split()]
	if posicio in loserino:
		print('Second')
	if posicio in win:
		print('First')


def get_winner(x, y):
	if x <= 0 or y <= 0 or x > 15 or (y > 15):
		return True
	if not get_winner(x - 2, y + 1) or not get_winner(x - 2, y - 1) or (not get_winner(x + 1, y - 2)) or (not get_winner(x - 1, y - 2)):
		return True
	return False

def solve(x, y):
	if get_winner(x, y):
		return 'First'
	else:
		return 'Second'
T = int(input())
for t in range(T):
	info = input().split(' ')
	print(solve(int(info[0]), int(info[1])))


for _ in range(int(input().strip())):
	(x, y) = map(int, input().strip().split())
	x = x % 4
	y = y % 4
	if x == 0 or x == 3 or y == 0 or (y == 3):
		print('First')
	else:
		print('Second')


from operator import xor
from functools import reduce

def memoize(f):
	cache = {}

	def wrapper(*args):
		if args not in cache:
			cache[args] = f(*args)
		return cache[args]
	return wrapper

class GameSolver:

	def is_winning_state(self, state):
		raise NotImplementedError

class NimSolver(GameSolver):

	def is_winning_state(self, piles):
		return reduce(xor, piles, 0) == 0

class Game(object):

	def __init__(self, size, moves):
		self.size = size
		self.moves = moves

	def is_valid(self, state):
		raise NotImplementedError

	def make_move(self, state, move):
		raise NotImplementedError

	def get_successors(self, state):
		successors = []
		for move in self.moves:
			next_state = self.make_move(state, move)
			if next_state is not None:
				successors.append(next_state)
		return successors

	@memoize
	def is_winning_state(self, state):
		next_states = self.get_successors(state)
		if not next_states:
			return False
		for next_state in next_states:
			if not self.is_winning_state(next_state):
				return True
		return False

class ChessBoardGame(Game):

	def __init__(self, size=15, moves=[(-2, 1), (-2, -1), (1, -2), (-1, -2)]):
		super(ChessBoardGame, self).__init__(size, moves)

	def is_valid(self, state):
		(row, col) = state
		return 1 <= row <= self.size and 1 <= col <= self.size

	def make_move(self, state, move):
		(row, col) = state
		next_state = (row + move[0], col + move[1])
		return next_state if self.is_valid(next_state) else None

class ChessBoardSolver(GameSolver):

	def __init__(self, chessboard):
		self.cb = chessboard
		self.grundy_cache = [[None] * (self.cb.size + 1) for _ in range(self.cb.size + 1)]

	def grundy(self, square):
		(r, c) = square
		if self.grundy_cache[r][c] is None:
			next_grundies = set([])
			for next_state in self.cb.get_successors(square):
				next_grundies.add(self.grundy(next_state))
			i = 0
			while i in next_grundies:
				i += 1
			self.grundy_cache[r][c] = i
		return self.grundy_cache[r][c]

	def is_winning_state(self, squares):
		return reduce(xor, map(self.grundy, squares), 0) != 0

class StonesGame(Game):

	def __init__(self, size, moves):
		super(StonesGame, self).__init__(size, moves)

	def is_valid(self, state):
		return state >= 0

	def make_move(self, state, move):
		next_state = state + move
		return next_state if self.is_valid(next_state) else None

def read_squares_from_std():
	return [tuple(map(int, input().split()))]

def solve():
	solver = ChessBoardSolver(ChessBoardGame())
	for _ in range(int(input())):
		squares = read_squares_from_std()
		print('First' if solver.is_winning_state(squares) else 'Second')
solve()


T = int(input())
wins = [0, 3]
for i in range(T):
	(x, y) = map(int, input().split())
	(x, y) = (x % 4, y % 4)
	if x in wins or y in wins:
		print('First')
	else:
		print('Second')


t = int(input())
while t:
	t -= 1
	(x, y) = input().strip().split()
	(x, y) = [int(x), int(y)]
	chance = 0
	x = x % 4
	y = y % 4
	if y == 0 or y == 3 or x == 0 or (x == 3):
		print('First')
	else:
		print('Second')


t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	x = x % 4
	y = y % 4
	if x == 0 or y == 0 or y == 3 or (x == 3):
		print('First')
	else:
		print('Second')


MOV = [(-2, 1), (-2, -1), (1, -2), (-1, -2)]
board = [[None] * 15 for _ in range(15)]

def looses(x, y):
	if not (0 <= x < 15 and 0 <= y < 15):
		return False
	if board[x][y] is None:
		board[x][y] = not any((looses(x + x_mov, y + y_mov) for (x_mov, y_mov) in MOV))
	return board[x][y]
n = int(input())
for _ in range(n):
	(x, y) = map(int, input().split())
	print('Second' if looses(x - 1, y - 1) else 'First')


(w, h) = (15, 15)

def valid(x, y):
	return x >= 0 and x < w and (y >= 0) and (y < h)

def invalid(x, y):
	return not valid(x, y)

def fill(x, y):
	if invalid(x - 2, y + 1) and invalid(x - 2, y - 1) and invalid(x + 1, y - 2) and invalid(x - 1, y - 2):
		Matrix[x][y] = 0
	else:
		v = True
		if v and valid(x - 2, y + 1) and (Matrix[x - 2][y + 1] == 0):
			v = False
		if v and valid(x - 2, y - 1) and (Matrix[x - 2][y - 1] == 0):
			v = False
		if v and valid(x + 1, y - 2) and (Matrix[x + 1][y - 2] == 0):
			v = False
		if v and valid(x - 1, y - 2) and (Matrix[x - 1][y - 2] == 0):
			v = False
		Matrix[x][y] = 0 if v else 1
Matrix = [[0 for x in range(w)] for y in range(h)]
for i in range(15):
	for x in range(0, i + 1):
		fill(i - x, x)
for i in range(1, 15):
	for x in range(i, 15):
		fill(14 - (x - i), x)
t = int(input())
for i in range(t):
	(x, y) = [int(i) for i in input().split()]
	if Matrix[x - 1][y - 1] == 0:
		print('Second')
	else:
		print('First')


for i in range(int(input())):
	(x, y) = (int(i) for i in input().split())
	if (x - 1) % 4 < 2 and (y - 1) % 4 < 2:
		print('Second')
	else:
		print('First')


win = [[None] * 15 for _ in range(15)]
moves = [(-2, 1), (-2, -1), (1, -2), (-1, -2)]

def isWin(x, y):
	if win[x][y] is not None:
		return win[x][y]
	pos = [(x + a, y + b) for (a, b) in moves]
	is_win = False
	for (m, n) in pos:
		if m not in range(15) or n not in range(15):
			continue
		else:
			is_win = is_win or not isWin(m, n)
	win[x][y] = is_win
	return is_win
for _ in range(int(input())):
	(x, y) = (int(a) for a in input().split(' '))
	print('First' if isWin(x - 1, y - 1) else 'Second')


known = set()
win_states = []
for i in range(16):
	win_states.append([])
	for b in range(16):
		win_states[i].append(0)

def check_state(x_pos, y_pos):
	if x_pos < 1 or y_pos < 1 or x_pos > 15 or (y_pos > 15):
		return True
	elif (y_pos - 1) * 15 + x_pos in known:
		return win_states[x_pos][y_pos]
	else:
		result = not (check_state(x_pos - 2, y_pos + 1) and check_state(x_pos - 2, y_pos - 1) and check_state(x_pos + 1, y_pos - 2) and check_state(x_pos - 1, y_pos - 2))
		win_states[x_pos][y_pos] = result
		known.add((y_pos - 1) * 15 + x_pos)
		return result
for i in range(int(input())):
	position = [int(x) for x in input().split()]
	if check_state(position[0], position[1]):
		print('First')
	else:
		print('Second')


for t in range(int(input().strip())):
	(x, y) = [int(a) for a in input().strip().split(' ')]
	x %= 4
	y %= 4
	if (y == 1 or y == 2) and (x == 1 or x == 2):
		print('Second')
	else:
		print('First')


t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	x = x % 4
	y = y % 4
	if y == 0 or y == 3 or x == 0 or (x == 3):
		print('First')
	else:
		print('Second')


print('\n'.join(map(lambda x: 'First' if (int(x[0]) - 1) // 2 % 2 or (int(x[1]) - 1) // 2 % 2 else 'Second', (input().split() for _ in range(int(input()))))))


a = [[None for i in range(15)] for j in range(15)]
for i in range(2):
	for j in range(2):
		a[i][j] = False

def win(x, y):
	if 0 <= x < 15 > y >= 0:
		if a[x][y] is None:
			a[x][y] = not all((win(x + d, y - 2) and win(x - 2, y + d) for d in (-1, 1)))
		return a[x][y]
	return True
for i in range(int(input())):
	print('First' if win(*map(lambda i: int(i) - 1, input().split())) else 'Second')


board = []
UNREAD = -1
for n in range(15):
	board.append([UNREAD] * 15)

def read(x, y):
	if x < 0 or x > 14 or y < 0 or (y > 14):
		return 2
	if board[x][y] == UNREAD:
		values = [read(x - 1, y - 2), read(x + 1, y - 2), read(x - 2, y - 1), read(x - 2, y + 1)]
		if min(values) == 2:
			board[x][y] = 0
		elif min(values) == 1:
			board[x][y] = 0
		else:
			board[x][y] = 1
	return board[x][y]
N = int(input())
for test in range(N):
	(x, y) = [int(i) for i in input().split()]
	if read(x - 1, y - 1) == 0:
		print('Second')
	else:
		print('First')


t = int(input())
win = [0, 3]
for i in range(t):
	(x, y) = map(int, input().split(' '))
	if x % 4 in win or y % 4 in win:
		print('First')
	else:
		print('Second')


tests = int(input())
inputs = []
for i in range(tests):
	arr = [int(arr_temp) for arr_temp in input().strip().split(' ')]
	inputs.append(arr)
for in_put in inputs:
	x = in_put[0]
	y = in_put[1]
	x_new = x % 4
	y_new = y % 4
	if y_new in [1, 2] and x_new in [1, 2]:
		print('Second')
	else:
		print('First')


print('\n'.join(map(lambda x: 'First' if (int(x[0]) - 1) // 2 % 2 or (int(x[1]) - 1) // 2 % 2 else 'Second', (input().split() for _ in range(int(input()))))))


def chess(x, y, p):
	if x <= 1 and y <= 1:
		return not p
	if x - 2 >= 0 and y + 1 < 15:
		if p == chess(x - 2, y + 1, not p):
			return p
	if x - 2 >= 0 and y - 1 >= 0:
		if p == chess(x - 2, y - 1, not p):
			return p
	if x + 1 < 15 and y - 2 >= 0:
		if p == chess(x + 1, y - 2, not p):
			return p
	if x - 1 >= 0 and y - 2 >= 0:
		if p == chess(x - 1, y - 2, not p):
			return p
	return not p
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	print('First' if chess(x - 1, y - 1, True) else 'Second')


print('\n'.join(map(lambda x: 'First' if (int(x[0]) - 1) // 2 % 2 or (int(x[1]) - 1) // 2 % 2 else 'Second', (input().split() for _ in range(int(input()))))))


import sys
board = [[' ' for x in range(15)] for y in range(15)]

def print_board():
	print('-' * 15)
	for i in range(15):
		for j in range(15):
			print(board[i][j], end='')
		print()
	print('-' * 15)

def moves(x, y):
	if x - 2 > -1:
		if y - 1 > -1:
			yield (x - 2, y - 1)
		if y + 1 < 15:
			yield (x - 2, y + 1)
	if y - 2 > -1:
		if x - 1 > -1:
			yield (x - 1, y - 2)
		if x + 1 < 15:
			yield (x + 1, y - 2)

def check(x, y):
	if board[x][y] == 'w' or board[x][y] == 'l':
		return 0
	results = list(moves(x, y))
	results = [board[a[0]][a[1]] for a in results]
	if len(results) == 0:
		board[x][y] = 'l'
		return 1
	elif 'l' in results:
		board[x][y] = 'w'
		return 1
	elif sum((1 for v in filter(lambda w: w != 'w', results))) == 0:
		board[x][y] = 'l'
		return 1
	else:
		board[x][y] = '?'
	return 0
counter = 0
for p in range(5):
	for i in [(x, y) for x in range(15) for y in range(15)]:
		counter += check(*i)
T = int(input())
for t in range(T):
	(x, y) = [int(a) - 1 for a in input().split()]
	if board[x][y] == 'w':
		print('First')
	else:
		print('Second')


print('\n'.join(map(lambda x: 'First' if (int(x[0]) - 1) // 2 % 2 or (int(x[1]) - 1) // 2 % 2 else 'Second', (input().split() for _ in range(int(input()))))))


def is_winning_pos(board, x, y):
	if x < 2 and y < 2:
		return False
	else:
		delta = [(-2, 1), (-2, -1), (1, -2), (-1, -2)]
		flag = True
		for (xo, yo) in delta:
			xx = x + xo
			yy = y + yo
			if xx >= 0 and xx < 15 and (yy >= 0) and (yy < 15):
				flag = flag and board[xx][yy] == 'W'
		return not flag

def prepare_board():
	board = [[None] * 15 for x in range(15)]
	for n in range(30):
		for x in range(n, -1, -1):
			y = n - x
			if x > 14 or y > 14:
				continue
			if is_winning_pos(board, x, y):
				board[x][y] = 'W'
			else:
				board[x][y] = 'L'
	return board
board = prepare_board()
T = int(input())
for t in range(T):
	(x, y) = [int(x) for x in input().strip().split()]
	if board[x - 1][y - 1] == 'W':
		print('First')
	else:
		print('Second')


for _ in range(int(input())):
	(x, y) = [int(i) % 4 for i in input().split()]
	print('First' if x == 0 or x == 3 or y == 0 or (y == 3) else 'Second')


print('\n'.join(map(lambda x: 'First' if (int(x[0]) - 1) // 2 % 2 or (int(x[1]) - 1) // 2 % 2 else 'Second', (input().split() for _ in range(int(input()))))))


print('\n'.join(map(lambda x: 'First' if (int(x[0]) - 1) // 2 % 2 or (int(x[1]) - 1) // 2 % 2 else 'Second', (input().split() for _ in range(int(input()))))))


def checkvalue(array, x, y, maxX, value):
	if y - 2 >= 0:
		if x + 1 < maxX and array[y - 2][x + 1] == value:
			return True
		if x - 1 >= 0 and array[y - 2][x - 1] == value:
			return True
	if x - 2 >= 0:
		if y + 1 < maxX and array[y + 1][x - 2] == value:
			return True
		if y - 1 >= 0 and array[y - 1][x - 2] == value:
			return True
	return False
T = int(input().strip())
chess = []
maxX = 15
maxY = 15
for i in range(maxX):
	temp = []
	for j in range(maxY):
		temp.append(None)
	chess.append(temp)
chess[0][0] = 'S'
chess[0][1] = 'S'
chess[1][0] = 'S'
chess[1][1] = 'S'
for x in range(maxX):
	for y in range(x + 1):
		if chess[x - y][y] is None:
			if checkvalue(chess, x - y, y, maxX, 'S'):
				chess[x - y][y] = 'F'
			else:
				chess[x - y][y] = 'S'
for x in range(1, maxX):
	z = maxX - 1
	for y in range(x, maxX):
		if chess[z][y] is None:
			if checkvalue(chess, z, y, maxX, 'S'):
				chess[z][y] = 'F'
			else:
				chess[z][y] = 'S'
		z -= 1
for _ in range(T):
	[x, y] = [int(n) for n in input().strip().split(' ')]
	if chess[x - 1][y - 1] == 'F':
		print('First')
	elif chess[x - 1][y - 1] == 'S':
		print('Second')


print('\n'.join(map(lambda x: 'First' if (int(x[0]) - 1) // 2 % 2 or (int(x[1]) - 1) // 2 % 2 else 'Second', (input().split() for _ in range(int(input()))))))


for _ in range(int(input())):
	(x, y) = map(int, input().split())
	x = x % 4
	y = y % 4
	print('First' if x == 3 or y == 3 or x == 0 or (y == 0) else 'Second')


from collections import deque

def check_winning_position_reachable(x, y, winner_map):
	dx = -2
	for dy in [-1, 1]:
		if check_boundaries(x, y, dx, dy, winner_map) and winner_map[y + dy][x + dx] == 2:
			return True
	dy = -2
	for dx in [-1, 1]:
		if check_boundaries(x, y, dx, dy, winner_map) and winner_map[y + dy][x + dx] == 2:
			return True
	return False

def check_boundaries(x, y, dx, dy, winner_map):
	return 0 <= x + dx < len(winner_map[0]) and 0 <= y + dy < len(winner_map)

def build_winner_map2(width, height):
	if width < 3 or height < 3:
		return None
	winner_map = [[0] * width for _ in range(height)]
	winner_map[0][0] = winner_map[1][0] = winner_map[0][1] = winner_map[1][1] = 2
	q = deque([(0, 0), (1, 0), (0, 1), (1, 1)])
	while q:
		(x, y) = q.pop()
		winner = winner_map[y][x]
		if winner == 2:
			dx = 2
			for dy in [-1, 1]:
				if check_boundaries(x, y, dx, dy, winner_map):
					winner_map[y + dy][x + dx] = 1
					q.appendleft((x + dx, y + dy))
			dy = 2
			for dx in [-1, 1]:
				if check_boundaries(x, y, dx, dy, winner_map):
					winner_map[y + dy][x + dx] = 1
					q.appendleft((x + dx, y + dy))
		elif winner == 1:
			dx = 2
			for dy in [-1, 1]:
				if check_boundaries(x, y, dx, dy, winner_map) and (not check_winning_position_reachable(x + dx, y + dy, winner_map)):
					winner_map[y + dy][x + dx] = 2
					q.appendleft((x + dx, y + dy))
			dy = 2
			for dx in [-1, 1]:
				if check_boundaries(x, y, dx, dy, winner_map) and (not check_winning_position_reachable(x + dx, y + dy, winner_map)):
					winner_map[y + dy][x + dx] = 2
					q.appendleft((x + dx, y + dy))
	return winner_map
winner_map = build_winner_map2(15, 15)
t = int(input())
for _ in range(t):
	(x, y) = map(int, input().strip().split())
	print('First' if winner_map[y - 1][x - 1] == 1 else 'Second')


from collections import namedtuple
Pos = namedtuple('Pos', ['r', 'c'])
BLANK = 'X'
FIRST_WIN = 'W'
FIRST_LOST = 'L'
COLS = ROWS = 15
MOVES = [Pos(-2, 1), Pos(-2, -1), Pos(-1, -2), Pos(1, -2)]
board = [[BLANK for _ in range(COLS)] for _ in range(ROWS)]

def print_board():
	for i in range(ROWS):
		print(' '.join(board[i]))
	print('-' * (COLS * 2 + 1))

def mark_pos(i_r, i_c):
	for move in MOVES:
		(r, c) = (i_r + move.r, i_c + move.c)
		if 0 <= r < ROWS and 0 <= c < COLS:
			if board[r][c] == BLANK:
				mark_pos(r, c)
			if board[r][c] == FIRST_LOST:
				board[i_r][i_c] = FIRST_WIN
				return
	board[i_r][i_c] = FIRST_LOST
for r in range(1 + 1):
	for c in range(1 + 1):
		board[r][c] = FIRST_LOST
for r in range(ROWS):
	for c in range(COLS):
		mark_pos(r, c)
t = int(input())
for _ in range(t):
	(x, y) = [int(x) - 1 for x in input().split()]
	print('First' if board[y][x] == FIRST_WIN else 'Second')


query = int(input())
for x in range(query):
	(x, y) = map(int, input().split())
	if y % 4 == 0 or y % 4 == 3 or x % 4 == 0 or (x % 4 == 3):
		print('First')
	else:
		print('Second')


size = 14
wins = [a[:] for a in [[None] * (size + 1)] * (size + 1)]
wins[0][0] = wins[1][1] = 1
wins[0][1] = wins[1][0] = 0
wins[2][0] = wins[0][2] = 0
moves = [(-1, -2), (1, -2), (-2, 1), (-2, -1)]
for d in range(3, 2 * size + 1):
	if d <= size:
		(lower, upper) = (0, d)
	else:
		(lower, upper) = (d - size, size)
	for x in range(lower, upper + 1):
		goal = d % 2
		for move in moves:
			final = list(map(sum, zip(move, (x, d - x))))
			if min(final) < 0 or max(final) > size:
				continue
			result = wins[final[0]][final[1]]
			if result == goal:
				wins[x][d - x] = goal
				break
		else:
			wins[x][d - x] = (goal + 1) % 2
t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	color = (x + y) % 2
	if color == wins[x - 1][y - 1]:
		print('First')
	else:
		print('Second')


n = int(input())
for _ in range(n):
	(x, y) = (int(i) for i in input().split(' '))
	if (x - 1) % 4 < 2 and (y - 1) % 4 < 2:
		print('Second')
	else:
		print('First')


for _ in range(int(input())):
	(x, y) = map(int, input().split(' '))
	x = x % 4
	y = y % 4
	if x == 3 or x == 0 or y == 0 or (y == 3):
		print('First')
	else:
		print('Second')


print('\n'.join(map(lambda x: 'First' if (int(x[0]) - 1) // 2 % 2 or (int(x[1]) - 1) // 2 % 2 else 'Second', (input().split() for _ in range(int(input()))))))


t = int(input())
for x in range(t):
	(x, y) = list(map(int, input().split(' ')))
	x = x % 4
	y = y % 4
	if y == 0 or y == 3 or x == 0 or (x == 3):
		print('First')
	else:
		print('Second')


N = 15
check = []
for x in range(N):
	check.append([False] * N)
for dim in range(2, N * 2):
	for pos in range(N):
		x = pos
		y = dim - pos
		if x < 0 or x >= N or y < 0 or (y >= N):
			continue
		sol = False
		if x - 2 >= 0:
			if y > 0:
				sol = sol or not check[x - 2][y - 1]
			if y + 1 < N:
				sol = sol or not check[x - 2][y + 1]
		if y - 2 >= 0:
			if x > 0:
				sol = sol or not check[x - 1][y - 2]
			if x + 1 < N:
				sol = sol or not check[x + 1][y - 2]
		check[x][y] = sol
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	res = check[x - 1][y - 1]
	print('First' if res else 'Second')


t = int(input())
for i in range(0, t):
	(x, y) = input().split()
	x = int(x) % 4
	y = int(y) % 4
	if x == 0 or x == 3 or y == 0 or (y == 3):
		print('First')
	else:
		print('Second')


from functools import lru_cache
RANGE = range(1, 15)

def iter_moves(x, y):
	moves = [(x - 2, y + 1), (x - 2, y - 1), (x + 1, y - 2), (x - 1, y - 2)]
	for (xn, yn) in moves:
		if xn in RANGE and yn in RANGE:
			yield (xn, yn)

@lru_cache()
def winner(x, y):
	if x not in RANGE and x not in RANGE:
		return 1
	return not all((winner(xn, yn) for (xn, yn) in iter_moves(x, y)))
n = int(input())
for _ in range(n):
	(x, y) = [int(el) for el in input().split()]
	print('First' if winner(x, y) == 1 else 'Second')


T = int(input())
for t in range(T):
	(x, y) = [int(l) for l in input().split()]
	if (x % 4 == 1 or x % 4 == 2) and (y % 4 == 1 or y % 4 == 2):
		print('Second')
	else:
		print('First')


for t in range(int(input())):
	inp = input().split()
	x = int(inp[0])
	y = int(inp[1])
	if (x - 1) // 2 % 2 == 0 and (y - 1) // 2 % 2 == 0:
		print('Second')
	else:
		print('First')


from collections import namedtuple
from fileinput import input
Position = namedtuple('Position', ['x', 'y'])

def is_valid(position):
	return 1 <= position.x <= 15 and 1 <= position.y <= 15

def add_move(moves, position):
	if is_valid(position):
		moves.append(position)

def get_moves(position):
	moves = []
	add_move(moves, Position(position.x - 2, position.y + 1))
	add_move(moves, Position(position.x - 2, position.y - 1))
	add_move(moves, Position(position.x + 1, position.y - 2))
	add_move(moves, Position(position.x - 1, position.y - 2))
	return moves
board = [[None for i in range(16)] for j in range(16)]

def can_win(position):
	if board[position.x][position.y] is None:
		moves = get_moves(position)
		if moves:
			win = any([will_lose(move) for move in moves])
		else:
			win = False
		if win:
			result = 'W'
		else:
			result = 'L'
		board[position.x][position.y] = result
	return board[position.x][position.y] == 'W'

def will_lose(position):
	if board[position.x][position.y] is None:
		moves = get_moves(position)
		if moves:
			lose = all([can_win(move) for move in moves])
		else:
			lose = True
		if lose:
			result = 'L'
		else:
			result = 'W'
		board[position.x][position.y] = result
	return board[position.x][position.y] == 'L'
data = input()
for _ in range(int(next(data))):
	(x, y) = map(int, next(data).split())
	if can_win(Position(x, y)):
		print('First')
	else:
		print('Second')


t = int(input())
for _ in range(t):
	(a, b) = (int(i) for i in input().split())
	if (a - 1) // 2 % 2 != 0 or (b - 1) // 2 % 2 != 0:
		print('First')
	else:
		print('Second')


print('\n'.join(map(lambda x: 'First' if (int(x[0]) - 1) // 2 % 2 or (int(x[1]) - 1) // 2 % 2 else 'Second', (input().split() for _ in range(int(input()))))))


print('\n'.join(map(lambda x: 'First' if (int(x[0]) - 1) // 2 % 2 or (int(x[1]) - 1) // 2 % 2 else 'Second', (input().split() for _ in range(int(input()))))))


for _ in range(int(input())):
	(x, y) = map(int, input().strip().split())
	(x, y) = (x % 4, y % 4)
	print('First' if x == 0 or y == 0 or x == 3 or (y == 3) else 'Second')


t = int(input())
s = [[0 for y in range(15)] for x in range(15)]
s[0][0] = 2
for j in range(30):
	for jj in range(15):
		if j < 15:
			(x, y) = (jj, j - jj)
		else:
			(x, y) = (j - 14 + jj, 14 - jj)
		if x >= 0 and y >= 0 and (x <= 14) and (y <= 14):
			if x - 2 >= 0 and y + 1 <= 14 and (s[x - 2][y + 1] == 2):
				s[x][y] = 1
			elif x - 2 >= 0 and y - 1 >= 0 and (s[x - 2][y - 1] == 2):
				s[x][y] = 1
			elif x + 1 <= 14 and y - 2 >= 0 and (s[x + 1][y - 2] == 2):
				s[x][y] = 1
			elif x - 1 >= 0 and y - 2 >= 0 and (s[x - 1][y - 2] == 2):
				s[x][y] = 1
			else:
				s[x][y] = 2
for x in range(t):
	[n, m] = [int(y) for y in input().strip().split(' ')]
	if s[n - 1][m - 1] == 1:
		print('First')
	else:
		print('Second')


n = int(input())
for i in range(n):
	(x, y) = list(map(int, input().split()))
	x %= 4
	y %= 4
	print('First' if y == 0 or y == 3 or x == 0 or (x == 3) else 'Second')


a = [[0 for i in range(0, 15)] for j in range(0, 15)]
for i in range(0, 2):
	a[i][0] = 2
	a[0][i] = 2
a[1][1] = 2
for tot in range(2, 29):
	for y in range(0, 15):
		x = tot - y
		if x >= 0 and x < 15 and (a[x][y] == 0):
			foundWin = False
			if x - 2 >= 0 and y - 1 >= 0 and (a[x - 2][y - 1] == 2):
				foundWin = True
			if x - 2 >= 0 and y + 1 < 15 and (a[x - 2][y + 1] == 2):
				foundWin = True
			if x - 1 >= 0 and y - 2 >= 0 and (a[x - 1][y - 2] == 2):
				foundWin = True
			if x + 1 < 15 and y - 2 >= 0 and (a[x + 1][y - 2] == 2):
				foundWin = True
			if foundWin:
				a[x][y] = 1
			else:
				a[x][y] = 2
t = int(input().strip())
for i in range(0, t):
	[q, r] = input().strip().split(' ')
	q = int(q) - 1
	r = int(r) - 1
	if a[q][r] == 2:
		print('Second')
	else:
		print('First')


for _ in range(int(input())):
	(x, y) = map(int, input().strip().split())
	(x, y) = (x % 4, y % 4)
	print('First' if y == 0 or y == 3 or x == 0 or (x == 3) else 'Second')


wins = [[0 for i in range(15)] for j in range(15)]
wins[0][0] = -1
wins[0][1] = -1
wins[1][0] = -1
wins[1][1] = -1
for d in range(2, 29):
	min_i = max(0, d - 14)
	max_i = min(d, 14)
	for i in range(min_i, max_i + 1):
		j = d - i
		min_move = 1
		for m in [(-2, -1), (-2, 1), (-1, -2), (1, -2)]:
			(ii, jj) = (i + m[0], j + m[1])
			if 0 <= ii <= 14 and 0 <= jj <= 14:
				min_move = min(min_move, wins[ii][jj])
		wins[i][j] = -min_move
T = int(input().strip())
for t in range(T):
	(x, y) = [int(tmp) - 1 for tmp in input().strip().split(' ')]
	print('Second' if wins[x][y] == -1 else 'First')


full = False
grid = [['-' for i in range(15)] for i in range(15)]
grid[0][0] = 'P'
grid[0][1] = 'P'
grid[1][0] = 'P'
grid[1][1] = 'P'
while not full:
	full = True
	for i in range(0, 15):
		for j in range(0, 15):
			if grid[i][j] != '-':
				continue
			full = False
			l = []
			if i > 0 and j > 1:
				l.append(grid[i - 1][j - 2])
			if i < 13 and j > 1:
				l.append(grid[i + 1][j - 2])
			if i > 1 and j > 0:
				l.append(grid[i - 2][j - 1])
			if i > 1 and j < 13:
				l.append(grid[i - 2][j + 1])
			if 'P' in l:
				grid[i][j] = 'N'
			elif all(map(lambda x: x == 'N', l)):
				grid[i][j] = 'P'
g = int(input().strip())
for g0 in range(g):
	(x, y) = list(map(int, input().strip().split(' ')))
	if grid[x - 1][y - 1] == 'P':
		print('Second')
	else:
		print('First')


t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	if x % 4 == 0 or x % 4 == 3 or y % 4 == 0 or (y % 4 == 3):
		print('First')
	else:
		print('Second')


value = [[-1 for i in range(15)] for j in range(15)]
moves = [(-2, 1), (-2, -1), (1, -2), (-1, -2)]
for s in range(29):
	for i in range(15):
		j = s - i
		if j < 0 or j >= 15:
			continue
		value[i][j] = 2
		for (x, y) in moves:
			ii = i + x
			jj = j + y
			if ii < 0 or ii >= 15 or jj < 0 or (jj >= 15):
				continue
			if value[ii][jj] == 2:
				value[i][j] = 1
				break
num_probs = int(input())
for prob in range(num_probs):
	(i, j) = (int(x) - 1 for x in input().split())
	if value[i][j] == 1:
		print('First')
	else:
		print('Second')


T = int(input())
for t in range(T):
	(x, y) = [int(x) for x in input().strip().split()]
	if x % 4 in [0, 3] or y % 4 in [0, 3]:
		print('First')
	else:
		print('Second')


numTests = int(input())
for test in range(numTests):
	(x, y) = [int(i) % 4 for i in input().split(' ')]
	if x == 0 or x == 3 or y == 0 or (y == 3):
		print('First')
	else:
		print('Second')


def winner(atpl, adict):
	if max(atpl) <= 2:
		return False
	for (x, y) in moves:
		(nx, ny) = (atpl[0] + x, atpl[1] + y)
		if min(nx, ny) > 0:
			if (nx, ny) in adict.keys():
				if not adict[nx, ny]:
					return True
				continue
			if max(nx, ny) <= size and (not winner((nx, ny), adict)):
				return True
	return False
t = int(input().strip())
size = 15
moves = [(-2, -1), (-1, -2), (1, -2), (-2, 1)]
windict = {}
for i in range(1, size + 1):
	for j in range(1, i + 1):
		boo = winner((i, j), windict)
		windict[i, j] = boo
		if i != j:
			windict[j, i] = boo
for i in range(t):
	(row, col) = map(int, input().split())
	print('First' if windict[row, col] else 'Second')


n = int(input())
while n > 0:
	n -= 1
	(x, y) = [int(i) for i in input().strip().split()]
	x -= 1
	y -= 1
	if x % 4 < 2 and y % 4 < 2:
		print('Second')
	else:
		print('First')


memo = {}
dy = [-2, -2, 1, -1]
dx = [1, -1, -2, -2]

def inside(y: int, x: int, H: int, W: int) -> bool:
	return 0 <= y < H and 0 <= x < W

def is_winning(x, y):
	if (x, y) in memo:
		return memo[x, y]
	for i in range(len(dy)):
		(next_y, next_x) = (y + dy[i], x + dx[i])
		if inside(next_y, next_x, 15, 15):
			if not is_winning(next_y, next_x):
				memo[x, y] = True
				return True
	memo[x, y] = False
	return False

def solve(x, y):
	return 'First' if is_winning(x, y) else 'Second'

def main():
	for _ in range(int(input())):
		(x, y) = map(int, input().split())
		print(solve(x - 1, y - 1))
main()


t = int(input().strip())
for i in range(t):
	(x, y) = input().strip().split(' ')
	(x, y) = [int(x), int(y)]
	x = x % 4
	y = y % 4
	if y == 0 or y == 3 or x == 0 or (x == 3):
		print('First')
	else:
		print('Second')


print('\n'.join(map(lambda x: 'First' if (int(x[0]) - 1) // 2 % 2 or (int(x[1]) - 1) // 2 % 2 else 'Second', (input().split() for _ in range(int(input()))))))


print('\n'.join(map(lambda x: 'First' if (int(x[0]) - 1) // 2 % 2 or (int(x[1]) - 1) // 2 % 2 else 'Second', (input().split() for _ in range(int(input()))))))


import sys
store = dict()

def move(x, y):
	if x < 1 or y < 1 or x > 15 or (y > 15):
		return True
	key = str(x) + ' ' + str(y)
	if key in store:
		return store[key]
	result = not move(x - 2, y + 1) or not move(x - 2, y - 1) or (not move(x + 1, y - 2)) or (not move(x - 1, y - 2))
	store[key] = result
	return result
tests = sys.stdin.readline()
for line in sys.stdin:
	coord = line.split()
	print('First' if move(int(coord[0]), int(coord[1])) else 'Second')


n_test = int(input().strip())
robot = []

def calSteps(list_a):
	(x, y) = list_a
	x = x % 4
	y = y % 4
	if y == 0 or y == 3 or x == 0 or (x == 3):
		return 'First'
	else:
		return 'Second'
for i in range(n_test):
	robot.append([int(temp) for temp in input().strip().split(' ')])
for i in range(n_test):
	print(calSteps(robot[i]))


t = int(input())
for i in range(t):
	(x, y) = list(map(int, input().split()))
	if x % 4 != 0 and x % 4 != 3 and (y % 4 != 0) and (y % 4 != 3):
		print('Second')
	else:
		print('First')


print('\n'.join(map(lambda x: 'First' if (int(x[0]) - 1) // 2 % 2 or (int(x[1]) - 1) // 2 % 2 else 'Second', (input().split() for _ in range(int(input()))))))


arr = [[0 for i in range(15)] for j in range(15)]
arr[0][0] = arr[0][1] = arr[1][0] = arr[1][1] = 'f'
for _ in range(50):
	for i in range(15):
		for j in range(15):
			if arr[i][j] == 'f' or arr[i][j] == 'w':
				continue
			if (i >= 2 and j >= 1) and arr[i - 2][j - 1] == 'f':
				arr[i][j] = 'w'
				continue
			if (i >= 2 and j <= 13) and arr[i - 2][j + 1] == 'f':
				arr[i][j] = 'w'
				continue
			if (i >= 1 and j >= 2) and arr[i - 1][j - 2] == 'f':
				arr[i][j] = 'w'
				continue
			if (i <= 13 and j >= 2) and arr[i + 1][j - 2] == 'f':
				arr[i][j] = 'w'
				continue
			if (i > 13 or j < 2 or arr[i + 1][j - 2] == 'w') and (i < 1 or j < 2 or arr[i - 1][j - 2] == 'w') and (i < 2 or j > 13 or arr[i - 2][j + 1] == 'w') and (i < 2 or j < 1 or arr[i - 2][j - 1] == 'w'):
				arr[i][j] = 'f'
for i in range(int(input())):
	(x, y) = map(int, input().split())
	if arr[x - 1][y - 1] == 'w':
		print('First')
	else:
		print('Second')


from sys import stdin

def read_ints():
	return [int(a.strip()) for a in stdin.readline().strip().split(' ')]
board = [[-1 for _ in range(15)] for _ in range(15)]
board[0][0] = 0
moves = [(-1, -2), (-2, -1), (-2, 1), (1, -2)]

def add(a, b):
	return (a[0] + b[0], a[1] + b[1])

def is_valid(p):
	return p[0] >= 0 and p[1] >= 0 and (p[0] < 15) and (p[1] < 15)

def nimber(p):
	b = board[p[0]][p[1]]
	if b != -1:
		return b
	fields = [add(p, a) for a in moves]
	nimbs = {nimber(a): True for a in fields if is_valid(a)}
	b = 0
	while b in nimbs:
		b += 1
	board[p[0]][p[1]] = b
	return b
for _ in range(read_ints()[0]):
	field = add((-1, -1), read_ints())
	print('First' if nimber(field) else 'Second')


import math
t = int(input())
for i in range(t):
	(x, y) = list(map(int, input().split(' ')))
	if math.ceil(x / 2) % 2 == 0 or math.ceil(y / 2) % 2 == 0:
		print('First')
	else:
		print('Second')


for _ in range(int(input().strip())):
	(x, y) = [int(x) for x in input().strip().split(' ')]
	print('First' if x % 4 == 3 or x % 4 == 0 or y % 4 == 3 or (y % 4 == 0) else 'Second')


t = int(input())
for i in range(t):
	(x, y) = input().split(' ')
	(x, y) = [int(x), int(y)]
	x = x % 4
	y = y % 4
	if y == 0 or y == 3 or x == 0 or (x == 3):
		print('First')
	else:
		print('Second')


t = int(input())
for t0 in range(t):
	(x, y) = list(map(int, input().split(' ')))
	if y % 4 == 0 or y % 4 == 3 or x % 4 == 0 or (x % 4 == 3):
		print('First')
	else:
		print('Second')


t = int(input())
MAX = 15
grundy = [[0 for x in range(15)] for y in range(15)]
moves = [(-2, -1), (-2, 1), (-1, -2), (1, -2)]

def mex(s):
	m = max(s)
	for i in range(m):
		if i not in s:
			return i
	return m + 1

def in_bound(x, y):
	return x >= 0 and x < MAX and (y >= 0) and (y < MAX)
for i in range(2 * MAX - 1):
	for j in range(i + 1):
		if not in_bound(i - j, j):
			continue
		if i - j <= 1 and j <= 1:
			grundy[i - j][j] = 0
		else:
			s = set()
			for (x, y) in moves:
				if in_bound(i - j + x, j + y):
					s.add(grundy[i - j + x][j + y])
			grundy[i - j][j] = mex(s)
for _ in range(t):
	(i, j) = (int(k) for k in input().split())
	if grundy[i - 1][j - 1] == 0:
		print('Second')
	else:
		print('First')


def q(x, y):
	x = x % 4
	y = y % 4
	if y == 0 or y == 3 or x == 0 or (x == 3):
		return 'First'
	else:
		return 'Second'
t = int(input())
while t != 0:
	t = t - 1
	(x, y) = map(int, input().split())
	a = q(x, y)
	print(a)


t = int(input())
for t0 in range(t):
	(n, m) = map(int, input().strip().split())
	if (n - 1) % 4 // 2 == 0 and (m - 1) % 4 // 2 == 0:
		print('Second')
	else:
		print('First')


t = int(input())
for i in range(t):
	(x, y) = (int(i) for i in input().split())
	x = x % 4
	y = y % 4
	if y == 0 or y == 3 or x == 0 or (x == 3):
		print('First')
	else:
		print('Second')