#include <bits/stdc++.h>
using namespace std;
const char road[1000] = "C:\\data\\";
char roadnum[1000] = "";
char roadin[1000] = "";
char roadout[1000] = "";
void writeIntoFile(char num[]) {
  strcpy(roadnum, num);
  strcpy(roadin, road);
  strcat(roadin, roadnum);
  strcat(roadin, ".");
  strcpy(roadout, roadin);
  strcat(roadin, "in");
  strcat(roadout, "out");
  freopen(roadin, "r", stdin);
  freopen(roadout, "w", stdout);
}
void solve();
void solveM() {
  char ch[50];
  for (int i = 1; i <= 30; i++) {
    sprintf(ch, "%d", i);
    writeIntoFile(ch);
    solve();
  }
}
const long long M = 1e18;
const long long MT = 1e4;
bool isFirst(long long a, long long b) {
  if (a > b) swap(a, b);
  if (a == 0) return false;
  if (!isFirst(b % a, a)) return true;
  return ((b / a) % (a + 1)) % 2 == 0;
}
void solve() {
  long long a, b;
  int T;
  int ioflag = -1;
  ioflag = scanf("%d", &T);
  assert(ioflag == 1);
  assert(1 <= T && T <= MT);
  while (T--) {
    ioflag = scanf("%lld%lld", &a, &b);
    assert(ioflag == 2);
    assert(0 <= a && a <= M);
    assert(0 <= b && b <= M);
    if (isFirst(a, b)) {
      puts("First");
    } else {
      puts("Second");
    }
  }
}
int main() {
  solve();
  return 0;
}
