#include <bits/stdc++.h>
using namespace std;
template <typename T>
T abs(T a) {
  return a < 0 ? -a : a;
}
template <typename T>
T sqr(T a) {
  return a * a;
}
const int INF = (int)1e9;
const long double EPS = 1e-9;
const long double PI = 3.1415926535897932384626433832795;
const int N = 2000;
long long a, b;
int gcd(long long a, long long b) {
  if (a > b) swap(a, b);
  if (a == 0) return 0;
  int cur = 1 - gcd(b % a, a);
  if (cur)
    return 1;
  else {
    long long x = b / a;
    long long n = a;
    if (n & 1) return 1 - (x & 1);
    long long pr = x % (n + 1);
    return 1 - (pr & 1);
  }
}
int main() {
  int tests;
  cin >> tests;
  for (int test = 0; test < int(tests); ++test) {
    cin >> a >> b;
    int ans = gcd(a, b);
    puts(ans ? "First" : "Second");
  }
  return 0;
}
