#include <bits/stdc++.h>
using namespace std;
bool win(long long a, long long b) {
  if (!a) return false;
  long long na, nb;
  na = b % a;
  nb = a;
  if (!win(na, nb)) return true;
  long long num = b / a;
  if (a % 2 == 1) {
    return (num % 2 == 0);
  }
  num %= (a + 1);
  return (num % 2 == 0);
}
int main() {
  int i, j;
  int t;
  cin >> t;
  for (i = 0; i < t; ++i) {
    long long a, b;
    cin >> a >> b;
    if (a > b) swap(a, b);
    if (win(a, b))
      cout << "First" << endl;
    else
      cout << "Second" << endl;
  }
  return 0;
}
