#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int N = 3e5;
vector<int> g[N];
int a[N];
int mpow(int base, int exp);
void ipgraph(int n, int m);
void dfs(int u, int par);
map<pair<long long, long long>, int> dp;
int go(long long a, long long b) {
  if (a < b) swap(a, b);
  if (dp.find({a, b}) != dp.end()) return dp[{a, b}];
  if (b == 0) return 0;
  if (a % b == 0) return 1;
  int ans = go(a % b, b);
  if (!ans) return dp[{a, b}] = 1;
  long long b_ = a / b;
  if (b & 1) return dp[{a, b}] = 1 - (b_ & 1);
  b_ %= (b + 1);
  if (b_ & 1) return dp[{a, b}] = 0;
  return dp[{a, b}] = 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int i, n, k, j;
  int t;
  cin >> t;
  while (t--) {
    long long x, y;
    cin >> x >> y;
    int win = go(x, y);
    if (win)
      cout << "First\n";
    else
      cout << "Second\n";
  }
  return 0;
}
int mpow(int base, int exp) {
  base %= mod;
  int result = 1;
  while (exp > 0) {
    if (exp & 1) result = ((long long)result * base) % mod;
    base = ((long long)base * base) % mod;
    exp >>= 1;
  }
  return result;
}
void ipgraph(int n, int m) {
  int i, u, v;
  while (m--) {
    cin >> u >> v;
    g[u - 1].push_back(v - 1);
    g[v - 1].push_back(u - 1);
  }
}
void dfs(int u, int par) {
  for (int v : g[u]) {
    if (v == par) continue;
    dfs(v, u);
  }
}
