#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10, INF = 0x3f3f3f3f, MOD = 1e9 + 7;
bool dfs(long long a, long long b) {
  if (a > b) swap(a, b);
  if (!a) return false;
  if (b % a == 0 || !dfs(b % a, a) || (b / a) % (a + 1) % 2 == 0) return true;
  return false;
}
int main() {
  ios_base::sync_with_stdio(0);
  int t;
  cin >> t;
  while (t--) {
    long long a, b;
    cin >> a >> b;
    cout << (dfs(a, b) ? "First" : "Second") << '\n';
  }
  return 0;
}
