CF176C.Playing with Superglue

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Two players play a game. The game is played on a rectangular board with n×mn×m squares. At the beginning of the game two different squares of the board have two chips. The first player's goal is to shift the chips to the same square. The second player aims to stop the first one with a tube of superglue.

We'll describe the rules of the game in more detail.

The players move in turns. The first player begins.

With every move the first player chooses one of his unglued chips, and shifts it one square to the left, to the right, up or down. It is not allowed to move a chip beyond the board edge. At the beginning of a turn some squares of the board may be covered with a glue. The first player can move the chip to such square, in this case the chip gets tightly glued and cannot move any longer.

At each move the second player selects one of the free squares (which do not contain a chip or a glue) and covers it with superglue. The glue dries long and squares covered with it remain sticky up to the end of the game.

If, after some move of the first player both chips are in the same square, then the first player wins. If the first player cannot make a move (both of his chips are glued), then the second player wins. Note that the situation where the second player cannot make a move is impossible — he can always spread the glue on the square from which the first player has just moved the chip.

We will further clarify the case where both chips are glued and are in the same square. In this case the first player wins as the game ends as soon as both chips are in the same square, and the condition of the loss (the inability to move) does not arise.

You know the board sizes and the positions of the two chips on it. At the beginning of the game all board squares are glue-free. Find out who wins if the players play optimally.

输入格式

The first line contains six integers nn , mm , x1x_{1} , y1y_{1} , x2x_{2} , y2y_{2} — the board sizes and the coordinates of the first and second chips, correspondingly ( 1<=n,m<=1001<=n,m<=100 ; 2<=n×m2<=n×m ; 1<=x1,x2<=n1<=x_{1},x_{2}<=n ; 1<=y1,y2<=m1<=y_{1},y_{2}<=m ). The numbers in the line are separated by single spaces.

It is guaranteed that the chips are located in different squares.

输出格式

If the first player wins, print "First" without the quotes. Otherwise, print "Second" without the quotes.

输入输出样例

  • 输入#1

    1 6 1 2 1 6
    

    输出#1

    First
  • 输入#2

    6 5 4 3 2 1
    

    输出#2

    First
  • 输入#3

    10 10 1 1 10 10
    

    输出#3

    Second
首页