#include <bits/stdc++.h>
using namespace std;
inline bool dfs(long long a, long long b) {
  if (a == 0 || b == 0) return 0;
  if (a > b) swap(a, b);
  long long z = b % a;
  if (!dfs(a, z)) return 1;
  if ((b / a) % (a + 1) % 2 == 0)
    return 1;
  else
    return 0;
}
signed main() {
  ios::sync_with_stdio(false);
  long long cases;
  cin >> cases;
  for (long long i = 1; i <= cases; i++) {
    long long x, y;
    cin >> x >> y;
    if (dfs(x, y)) {
      cout << "First" << endl;
    } else
      cout << "Second" << endl;
  }
  return 0;
}
