#include<bits/stdc++.h>
using namespace std;

typedef long long ll;

#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define file() freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);
#define tt int t; cin>>t; while(t--)
#define nl cout<<"\n";
#define sp cout<<" ";
#define rep(i, a, b) for(long long i=a; i<b; i++)

const int INF = 1e9 + 7;
const int MOD = 1e9 + 7;
double PI = 4*atan(1);

int main()
{
    optimize();

    int n;
    cin>> n;

    ll a[n] ;
    bool p= 1;

    cin >> a[0];
    ll g= a[0];

    for(int i=1; i<n; i++)
    {
        cin>> a[i];
        g= __gcd (g, a[i]);

        if( __gcd (a[i], a[i-1] ) > 1)
            p= 0;
    }


    if( g>1)
        cout << "not coprime\n";

    else if ( p==1)
        cout << "pairwise coprime\n";

    else
        cout << "setwise coprime\n";


    return 0;
}


