#include #include #include #include #include #include #include #include #include #include #include #include #include #define debug_value(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << #x << "=" << x << endl; #define debug(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << x << endl; template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } using namespace std; typedef long long ll; template vector> vec2d(int n, int m, T v){ return vector>(n, vector(m, v)); } template vector>> vec3d(int n, int m, int k, T v){ return vector>>(n, vector>(m, vector(k, v))); } template void print_vector(vector v, char delimiter=' '){ if(v.empty()) { cout << endl; return; } for(int i = 0; i+1 < v.size(); i++) cout << v[i] << delimiter; cout << v.back() << endl; } int mex(vector v){ int n = v.size(); vector used(n+1); for(int x: v){ if(x <= n) used[x] = true; } for(int i = 0; i <= n; i++){ if(!used[i]) return i; } } vector calc(int n){ vector g(n+1); for(int x = 4; x <= n; x++){ vector v; for(int l = 2; l+2 <= x; l++){ int r = x-l; v.push_back(g[l]^g[r]); } g[x] = mex(v); } // for(int i = 0; i <= n; i++){ // cout << g[i] << ' '; // if(i%34 == 0) cout << endl; // } return g; } int main(){ ios::sync_with_stdio(false); cin.tie(0); cout << setprecision(10) << fixed; auto g = calc(500); auto grundy = [&](int x){ if(x < g.size()) return g[x]; x %= 34; x += 34*5; return g[x]; }; int t; cin >> t; while(t--){ int a, b; cin >> a >> b; ll x = grundy(a)^grundy(b); if(x == 0) cout << "Second" << endl; else cout << "First" << endl; } }