#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T& x) {
  bool fu = 0;
  char c;
  for (c = getchar(); c <= 32; c = getchar())
    ;
  if (c == '-') fu = 1, c = getchar();
  for (x = 0; c > 32; c = getchar()) x = x * 10 + c - '0';
  if (fu) x = -x;
};
template <class T>
inline void read(T& x, T& y) {
  read(x);
  read(y);
}
template <class T>
inline void read(T& x, T& y, T& z) {
  read(x);
  read(y);
  read(z);
}
inline char getc() {
  char c;
  for (c = getchar(); c <= 32; c = getchar())
    ;
  return c;
}
long long a, b;
bool solve(long long a, long long b) {
  if (a > b) return solve(b, a);
  if (a == 0) return 0;
  if (!solve(a, b % a)) return 1;
  if ((b / a) % (a + 1) % 2 == 0) return 1;
  return 0;
}
int main() {
  int T;
  for (read(T); T; T--) {
    read(a, b);
    if (solve(a, b))
      printf("First\n");
    else
      printf("Second\n");
  }
  return 0;
}
