#include <bits/stdc++.h>
using namespace std;
long long a, b;
bool win(long long a, long long b) {
  if (a == 0 || b == 0) return false;
  if (a > b) swap(a, b);
  if (win(a, b % a) == false) return true;
  return (b / a) % (a + 1) % 2 == 0;
}
int main() {
  int T;
  cin >> T;
  while (T--) {
    long long a, b;
    cin >> a >> b;
    if (win(a, b) == true)
      cout << "First\n";
    else
      cout << "Second\n";
  }
}
