#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T bigmod(T p, T e, T M) {
  if (e == 0) return 1;
  if (e % 2 == 0) {
    T t = bigmod(p, e / 2, M);
    return (t * t) % M;
  }
  return (bigmod(p, e - 1, M) * p) % M;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
template <class T>
inline T multimod(T a, T b, T m) {
  T ans = 0ll;
  a %= m, b %= m;
  while (b) {
    if (b & 1ll) ans = m - ans > a ? (ans + a) : (ans + a - m);
    b >>= 1ll;
    a = (m - a) > a ? a + a : a + a - m;
  }
  return (T)ans;
}
long long dp[102][2688];
char str[102];
long long solve(long long a, long long b) {
  if (a < b) swap(a, b);
  if (a == 0ll || b == 0ll) return false;
  if (!solve(b, a % b)) return true;
  long long x = a / b;
  return (x % (b + 1) % 2 == 0);
}
int main() {
  int i, j, x, y, k;
  int u, v, m, q, t, n, w;
  memset(dp, -1ll, sizeof dp);
  scanf("%d", &t);
  while (t--) {
    long long a, b;
    cin >> a >> b;
    if (solve(a, b))
      cout << "First" << endl;
    else
      cout << "Second" << endl;
  }
  return 0;
}
