#include <bits/stdc++.h>
#define ll long long
#define endl "\n"
#define shalaby ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);cerr.tie(0);
///#define mod 1e9+7
using namespace std;

inline int D()
{
    int t;
    scanf("%d",&t);
    return t;
}
inline ll llD()
{
    ll t;
    scanf("%lld",&t);
    return t;
}
ll mod=1e9+7;
const int OO=-1e6;
int xt[4]= {1,0,0,-1};
int yt[4]= {0,1,-1,0};
////////////////////////////////////////////////////////////////////////////////////

const int N = 1e7+1;
ll greatestPF[N];
vector <int > prime;
void sieve()
{

    greatestPF[0]=greatestPF[1]=1;
    for(long long i=2; i<=N; ++i)
    {
        if(!greatestPF[i])
        {
            for(long long j=i; j<=N; j+=i)
            {
                greatestPF[j]=i;
                greatestPF[j]=min(i, greatestPF[j]);
            }
        }
    }
}
ll mem[100005][3],a[200005],b[105],n,m,k,frq[200005];
bool valid(int x,int y)
{
    return x>-1 && y>-1 && x<n && y<m;
}
void init()
{
    memset(mem,-1,sizeof mem);
}

/////////////////////////////////////////////////////////////////////




int main()
{
    sieve();
    int T=1;
///   T=D();
    while(T-->0)
    {

        cin>>n;
        ll m=0;
        ll g = 0;
        for(ll i=0; i<n; i++)
        {
            cin>>a[i];
            g = __gcd(g, a[i]);
		while(a[i] != 1)
		{
		  ///  cout<<a[i]<<" "<<greatestPF[a[i]]<<endl;
			int cur = greatestPF[a[i]];
			frq[ cur ]++;
			m=max(m,frq[cur]);
			while(a[i] % cur == 0)a[i]/=cur;
		}
	    }


        if(m<=1)
            cout<<"pairwise coprime\n";
        else if(g==1)
            cout<<"setwise coprime\n";
        else
            cout<<"not coprime\n";

        /*** for(int i=1; i<9; i++)
               cout<<i<<" "<<greatestPF[i]<<endl;
*/

    }
}
