#include <bits/stdc++.h>
using namespace std;
bool win(long long a, long long b) {
  if (a > b) swap(a, b);
  if (a == 0) return false;
  if (!win(b % a, a)) return true;
  long long df = b - b % a;
  if (a % 2)
    return df % 2 == 0;
  else
    return df / a % (a + 1) % 2 == 0;
}
void solve() {
  long long a, b;
  cin >> a >> b;
  if (win(a, b))
    cout << "First" << endl;
  else
    cout << "Second" << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  int T;
  cin >> T;
  for (int _ = 0; _ < (int)(T); _++) solve();
  return 0;
}
