7
576460752303423487 2
82 9
101 104
10 21
31 10
0 1
10 30
 1
128817972817282999 327672410994637530
 66
7 0
5 7
1 3
3 2
3 5
0 6
1 2
0 7
4 5
4 7
5 1
2 0
4 0
0 5
3 6
7 3
6 0
5 2
6 6
1 7
5 6
2 2
3 4
2 1
5 3
4 6
6 2
3 3
100000000000 1000000000000000000
0 1
4 1
2 6
5 5
4 3
0 3
3 7
3 1
1 0
4 4
1000000000000000000 100000000000
7 6
4 2
7 5
1 6
6 1
2 7
7 7
6 7
2 4
0 2
2 5
7 2
0 0
5 0
5 4
7 4
6 4
0 4
1 1
6 5
1 4
2 3
1 5
7 1
6 3
3 0
 1
100000000000 100000000001
 1
23917 1000000000000000000

First
Second
Second
First
Second
Second
First
 First
 Second
Second
First
Second
First
Second
First
Second
Second
First
First
Second
Second
Second
First
First
Second
First
First
First
Second
First
Second
First
First
Second
First
First
First
Second
First
First
First
Second
Second
First
First
Second
First
First
Second
First
Second
First
First
First
First
Second
First
Second
First
First
Second
Second
Second
First
Second
Second
First
Second
First
Second
First
First
First
Second
 Second
 Second

#include <bits/stdc++.h>
template <typename T>
constexpr auto hasBegin(int) -> decltype(std::begin(std::declval<T>()), true) {
  return true;
}
constexpr bool hasBegin(...) { return false; }
template <typename T>
using IsContainer = std::integral_constant<bool, hasBegin<T>(0)>;
template <class X, class Y>
std::ostream &operator<<(std::ostream &os, std::pair<X, Y> const &p) {
  return os << p.first << " " << p.second;
}
template <class Ch, class Tr, class Container>
std::basic_ostream<Ch, Tr> &operator<<(std::basic_ostream<Ch, Tr> &os,
                                       Container const &x) {
  bool first = true;
  for (auto &y : x) {
    if (first) {
      first = false;
    } else {
      os << " ";
    }
    os << y;
  }
  return os;
}
using namespace std;
class CWizardsAndNumbers {
  void solve(int testNumber, istream &in, ostream &out) {
    long long a, b;
    in >> a >> b;
    if (a < b) {
      swap(a, b);
    }
    bool res = f(a, b);
    out << (res ? "First" : "Second") << "\n";
  }
  bool f(long long a, long long b) {
    if (b == 0) {
      return false;
    }
    bool next = f(b, a % b);
    if (not next) {
      return true;
    }
    long long d = (a - a % b) / b;
    if (b % 2) {
      return d % 2 == 0;
    }
    return d % (b + 1) % 2 == 0;
  }

 public:
  void solve(std::istream &in, std::ostream &out) {
    int t;
    in >> t;
    for (int i = 1; i <= t; ++i) {
      solve(i, in, out);
    }
  }
  void setup() {}
};
int main() {
  std::ios_base::sync_with_stdio(false);
  CWizardsAndNumbers solver;
  solver.setup();
  std::istream &in(std::cin);
  std::ostream &out(std::cout);
  in.tie(nullptr);
  out << std::fixed;
  out.precision(20);
  solver.solve(in, out);
  return 0;
}
