#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
bool calc(long long x, long long y) {
  if (x > y) swap(x, y);
  if (x == 0) return 0;
  if (!calc(x, y % x)) return 1;
  if (((y / x) % (x + 1)) & 1) return 0;
  return 1;
}
int main() {
  int Test;
  Test = read();
  while (Test--) {
    long long x, y;
    x = read();
    y = read();
    if (calc(x, y))
      puts("First");
    else
      puts("Second");
  }
  return 0;
}
