7
576460752303423487 2
82 9
101 104
10 21
31 10
0 1
10 30
 1
128817972817282999 327672410994637530
 66
7 0
5 7
1 3
3 2
3 5
0 6
1 2
0 7
4 5
4 7
5 1
2 0
4 0
0 5
3 6
7 3
6 0
5 2
6 6
1 7
5 6
2 2
3 4
2 1
5 3
4 6
6 2
3 3
100000000000 1000000000000000000
0 1
4 1
2 6
5 5
4 3
0 3
3 7
3 1
1 0
4 4
1000000000000000000 100000000000
7 6
4 2
7 5
1 6
6 1
2 7
7 7
6 7
2 4
0 2
2 5
7 2
0 0
5 0
5 4
7 4
6 4
0 4
1 1
6 5
1 4
2 3
1 5
7 1
6 3
3 0
 1
100000000000 100000000001
 1
23917 1000000000000000000

First
Second
Second
First
Second
Second
First
 First
 Second
Second
First
Second
First
Second
First
Second
Second
First
First
Second
Second
Second
First
First
Second
First
First
First
Second
First
Second
First
First
Second
First
First
First
Second
First
First
First
Second
Second
First
First
Second
First
First
Second
First
Second
First
First
First
First
Second
First
Second
First
First
Second
Second
Second
First
Second
Second
First
Second
First
Second
First
First
First
Second
 Second
 Second

#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64000000")
using namespace std;
const double pi = 3.1415926535897932384626433832795;
double eps = 1e-9;
char ch[1 << 20];
inline string gs() {
  scanf("%s", ch);
  return string(ch);
}
inline string gl() {
  gets(ch);
  return string(ch);
}
inline int gi() {
  int x;
  scanf("%d", &x);
  return x;
}
void error(bool x) {
  if (x) {
    fprintf(stderr, "ERROR\n");
    int ttt = 0;
    cout << 7 / ttt;
  }
}
template <class T>
T gcd(T a, T b) {
  return (!a) ? b : gcd(b % a, a);
}
int mod = 1000000007;
inline int ADD(int a, int b) { return (a + b >= mod) ? a + b - mod : a + b; }
inline int SUB(int a, int b) { return (a - b < 0) ? a - b + mod : a - b; }
inline int MUL(int a, int b) { return 1ll * a * b % mod; }
inline int POW(int a, int n) {
  int r = 1;
  while (n) {
    if (n & 1) r = MUL(r, a);
    n >>= 1;
    a = MUL(a, a);
  }
  return r;
}
const int MATRIX_SIZE = 11;
typedef int matrix[MATRIX_SIZE][MATRIX_SIZE];
void MMUL(matrix &a, matrix &b) {
  matrix c;
  for (int i = (0), _b(MATRIX_SIZE); i < _b; ++i)
    for (int j = (0), _b(MATRIX_SIZE); j < _b; ++j) c[i][j] = 0;
  for (int i = (0), _b(MATRIX_SIZE); i < _b; ++i)
    for (int j = (0), _b(MATRIX_SIZE); j < _b; ++j) {
      for (int k = (0), _b(MATRIX_SIZE); k < _b; ++k)
        c[i][j] = ADD(c[i][j], MUL(a[i][k], b[k][j]));
    }
  for (int i = (0), _b(MATRIX_SIZE); i < _b; ++i)
    for (int j = (0), _b(MATRIX_SIZE); j < _b; ++j) a[i][j] = c[i][j];
}
int solve(long long a, long long b) {
  if (a > b) swap(a, b);
  if (a == 0) {
    return 0;
  } else {
    int win = solve(b % a, a);
    if (win == 0) return 1;
    long long n = b / a;
    if (a % 2LL == 1) {
      if (n % 2LL == 1)
        return 0;
      else
        return 1;
    } else {
      if ((n % (a + 1LL)) % 2LL == 0)
        return 1;
      else
        return 0;
    }
  }
}
int main(int argn, char **argv) {
  int tn = gi();
  while (tn--) {
    long long a;
    long long b;
    cin >> a >> b;
    if (solve(a, b))
      printf("First\n");
    else
      printf("Second\n");
  }
  return 0;
}
