#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T checkmin(T &a, T b) {
  return (a < b) ? a : a = b;
}
template <class T>
inline T checkmax(T &a, T b) {
  return (a > b) ? a : a = b;
}
template <class T>
T GCD(T a, T b) {
  if (a < 0) return GCD(-a, b);
  if (b < 0) return GCD(a, -b);
  return (a == 0) ? b : GCD(b % a, a);
}
template <class T>
T LCM(T a, T b) {
  if (a < 0) return LCM(-a, b);
  if (b < 0) return LCM(a, -b);
  return (a == 0 || b == 0) ? 0 : a / GCD(a, b) * b;
}
template <class T>
T ExtGCD(T a, T b, T &x, T &y) {
  if (a < 0) {
    T c = ExtGCD(-a, b, x, y);
    x = -x;
    return c;
  }
  if (b < 0) {
    T c = ExtGCD(a, -b, x, y);
    y = -y;
    return c;
  }
  if (a == 0) {
    x = 0, y = 1;
    return b;
  } else {
    T c = ExtGCD(b % a, a, y, x);
    x -= b / a * y;
    return c;
  }
}
template <class T>
inline T sqr(T X) {
  return X * X;
}
namespace Poor {
bool f(long long a, long long b) {
  if (a > b) swap(a, b);
  if (a == 0) return 0;
  if (a == 1) return 1;
  long long t = b / a;
  vector<long long> list;
  while (t > 0) {
    list.push_back(t % a);
    t /= a;
  }
  if (list.size() == 1) {
    if (list[0] % 2 == 0) return 1;
    return !f(b % a, a);
  }
  if (a % 2 == 0) {
    if (!f(b % a, a)) return 1;
    return (((b / a) % (a + 1)) % 2 == 0);
  }
  if ((b / a) % 2 == 0) return 1;
  return !f(b % a, a);
}
void Solve() {
  long long a, b;
  cin >> a >> b;
  puts(f(a, b) ? "First" : "Second");
}
void Run() {
  int TestCase;
  cin >> TestCase;
  for (int i = 1; i <= TestCase; ++i) Solve();
}
}  // namespace Poor
int main() {
  Poor::Run();
  return 0;
}
