#include <bits/stdc++.h>
using namespace std;
const int M = 100 + 10;
int GCD(long long int a, long long int b) {
  if (b == 0) {
    return 0;
  }
  int res = GCD(b, a % b);
  if (res == 0) {
    return 1;
  } else {
    long long int k = a / b;
    if (b & 1) {
      int ans = 1 - k % 2;
      return ans;
    } else {
      if (k % (b + 1) == 0) {
        return 1;
      } else {
        int ans = 1 - k % (b + 1) % 2;
        return ans;
      }
    }
  }
}
int main() {
  time_t t_start, t_end;
  t_start = clock();
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    long long int a, b;
    cin >> a >> b;
    if (b > a) {
      long long int tmp = a;
      a = b;
      b = tmp;
    }
    int res = GCD(a, b);
    string ans = (res == 1 ? "First" : "Second");
    cout << ans << endl;
  }
  t_end = clock();
  return 0;
}
