#include <bits/stdc++.h>
using namespace std;
bool myfunction(int i, int j) { return (i < j); }
long long t, a, b;
bool getAns(long long b, long long a, bool who) {
  if (b == 0 || a == 0) return !who;
  if (getAns(a, b % a, !who) == who) return who;
  long long p = b / a;
  if (p % (a + 1) % 2 == 0)
    return who;
  else
    return !who;
}
int main() {
  cin >> t;
  while (t--) {
    cin >> a >> b;
    if (getAns(max(a, b), min(a, b), 1))
      cout << "First" << endl;
    else
      cout << "Second" << endl;
  }
  return 0;
}
