#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;
}
