#include <bits/stdc++.h>
using namespace std;
long long find(long long a, long long b) {
  long long res = 0;
  while (a > 0) {
    res += a % b;
    a /= b;
  }
  return res;
}
int32_t main() {
  long long t, z;
  cin >> t;
  while (t--) {
    z = 0;
    long long a, b;
    cin >> a >> b;
    if (a == 0 or b == 0) cout << "Second";
    while (a > 0 and b > 0) {
      if (a < b) swap(a, b);
      if (a % b == 0) {
        if (z == 0)
          cout << "First";
        else
          cout << "Second";
        break;
      }
      long long zz = a / b % (b + 1);
      if (zz % 2 == 0) {
        if (z == 0)
          cout << "First";
        else
          cout << "Second";
        break;
      }
      a = a % b;
      z = 1 - z;
    }
    cout << '\n';
  }
  return 0;
}
