///Bismilah////
#include<bits/stdc++.h>
///sakil ahmed///
using namespace std;
int main()
{
    long long int t,n,d,tmp,cnt,sum,i,j,a,b,c,mx = LLONG_MIN,mn = LLONG_MAX;
    cin>>t;
    string str,str1;
    map<int,int>mp;
    vector<int>v;
    set<int>s;
    while(t--)
    {
        int a,b;
        cin>>a>>b;
        if(a>b)
            cout<<"safe\n";
        else
            cout<<"unsafe\n";
    }
    return 0;
}
