#include <bits/stdc++.h>
using namespace std;
bool f(long long a, long long b) {
  if (a > b) swap(a, b);
  if (a * b == 0) return false;
  if (f(b % a, a) == false) return true;
  b = b / a;
  long long mod = a + 1;
  return ((b % mod) % 2 == 0);
}
int solve() {
  long long a, b;
  scanf("%lld%lld", &a, &b);
  return f(a, b);
}
int test;
int main() {
  cin >> test;
  while (test--) {
    if (solve() == 1)
      cout << "First" << endl;
    else
      cout << "Second" << endl;
  }
  return 0;
}
