#include <bits/stdc++.h>
using namespace std;
long long tests, t, qq, q, i, j, bb[200000], s1, ans[2100][2100];
long long a, b;
long solve(long long a, long long b) {
  if (a < b) swap(a, b);
  if (a == 0 || b == 0) return 0;
  if (solve(a % b, b) == 0) return 1;
  t = a / b;
  if (b % 2 == 1) return 1 - t % 2;
  t %= (b + 1);
  if (t % 2 == 1) return 0;
  return 1;
}
int main() {
  long s = 0;
  cin >> tests;
  for (; tests; --tests) {
    cin >> a >> b;
    if (solve(a, b))
      cout << "First" << endl;
    else
      cout << "Second" << endl;
  }
  cin.get();
  cin.get();
  return 0;
}
