#include <bits/stdc++.h>
using namespace std;
const int MAX = int(1e5) + 10;
int CHAR;
inline void eat() {
  do {
    CHAR = getchar();
  } while (CHAR == ' ' || CHAR == '\n' || CHAR == '\t');
}
inline long long getnumber() {
  eat();
  long long ret = 0;
  while (isdigit(CHAR)) {
    ret = 10 * ret + CHAR - 48;
    CHAR = getchar();
  }
  return ret;
}
inline void getstring(char *str) {
  eat();
  int cc = 0;
  while (isalpha(CHAR)) {
    str[cc++] = CHAR;
    CHAR = getchar();
  }
  str[cc] = '\0';
}
bool win(long long a, long long b) {
  if (a > b) swap(a, b);
  if (a == 0) return false;
  if (!win(b % a, a)) return true;
  long long x = b / a;
  return x % (a + 1) % 2 == 0;
}
int main() {
  for (int test = getnumber(); test; test--) {
    long long a = getnumber(), b = getnumber();
    if (win(a, b))
      cout << "First\n";
    else
      cout << "Second\n";
  }
  return 0;
}
