
    #include <bits/stdc++.h>
    using namespace std;
    typedef long long ll;
    #define FAST ios_base::sync_with_stdio(false);cin.tie(0);
    const double EPS = 1e-9;
    const double PI = acos(-1);
    const int knightDir[8][2] = {{-2,-1},{-2,1},{-1,2},{1,2},{2,-1},{2,1},{-1,-2},{1,-2}};
    //const int dx[]={0,0,0,1,1,1,-1,-1,-1};
    //const int dy[]={-1,0,1,-1,0,1,-1,0,1};
    const int dx[] = {0 , 1 , 0 , -1};
    const int dy[] = {1 , 0 , -1 , 0};
    //#define MOD         1000000007LL
    #define MAX         10000005
    const ll MOD = 1000000000 + 7;
    int arr[MAX] , n;
    
    bool pairwise()
    {
        for(int i = 0 ; i < n - 1 ; i++)
        {
            for(int j = i + 1 ; j < n ; j++)
            {
                if(__gcd(arr[i] , arr[j]) != 1)return false;
            }
        }
        return true;
    }
    
    bool setwise()
    {
        int ans = arr[0];
        
        for(int i = 1 ; i < n ; i++)
        {
            ans = __gcd(ans , arr[i]);
            
        }
        if(ans != 1)return false;
        return true;
    }
    
    int main()
    {
        FAST
        int t;
        t = 1;

        while(t--)
        {
           
           cin >> n;
           
           for(int i = 0 ;  i < n ; i++)cin >> arr[i];
        
           if(pairwise())cout << "pairwise coprime\n";
           else if(setwise())cout << "setwise coprime\n";
           else cout << "not coprime\n";
        }
    }

