#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-9;
const int inf = (1 << 30) - 1;
const long long inf64 = ((long long)1 << 62) - 1;
const long double pi = 3.1415926535897932384626433832795;
const string task = "";
template <class T>
T sqr(T x) {
  return x * x;
}
int solve(long long a, long long b) {
  long long w = (b / a) % (a + 1);
  return (w + 1) % 2;
}
int calc(long long a, long long b) {
  if (a > b) swap(a, b);
  if (a == 0) return 0;
  if (!calc(b % a, a)) return 1;
  if (solve(a, b - b % a)) return 1;
  return 0;
}
void solve() {
  long long a, b;
  cin >> a >> b;
  if (calc(a, b))
    puts("First");
  else
    puts("Second");
}
long long gen() {
  long long mod = 1e18;
  long long now = rand();
  now = (now << 48 | rand());
  now = (now % mod + mod) % mod;
  return now;
}
int main() {
  int tst;
  cin >> tst;
  for (int i = 0; i < (int)(tst); i++) {
    solve();
  }
  return 0;
}
