#include <bits/stdc++.h>
int main() {
  std::function<bool(long long int, long long int)> do_first_player_win =
      [&do_first_player_win](long long int a, long long int b) {
        assert(a <= b);
        if (a == 0)
          return false;
        else if (a == 1)
          return true;
        long long int modulo = b % a;
        if (do_first_player_win(modulo, a)) {
          if (a & 1)
            return (((b - modulo) / a) & 1) == 0;
          else {
            long long int m = ((b - modulo) / a) % (a + 1);
            return (m & 1) == 0;
          }
        } else
          return true;
      };
  int t;
  for (std::scanf("%d", &t); t; t--) {
    long long int a, b;
    scanf("%lld %lld", &a, &b);
    if (a > b) std::swap(a, b);
    printf(do_first_player_win(a, b) ? "First\n" : "Second\n");
  }
  return 0;
}
