#include<bits/stdc++.h>
using namespace std;
#define ll          long long
#define endl        "\n"
#define si(a)       scanf("%d",&a)
#define si2(a,b)    scanf("%d%d",&a,&b)
#define si3(a,b,c)  scanf("%d%d%d",&a,&b,&c)
#define sl(a)       scanf("%lld",&a)
#define sl2(a,b)    scanf("%lld%lld",&a,&b)
#define sl3(a,b,c)  scanf("%lld%lld%lld",&a,&b,&c)
#define pb          push_back
#define mk          make_pair
#define loop(n)     for(int i=0; i<n; i++)
#define FOR(a,b)    for(int i=a; i<=b; i++)
#define sz          size()
#define pY          printf("YES")
#define pN          printf("NO")
#define py          printf("Yes")
#define pn          printf("No")
#define mem(a,val)  memset(a, val, sizeof(a))
#define md          1000000007




ll a[1000010], cs[1000010];
int main()
{
    ll t,n,i,j,k,l,mul=1,p=1,m;

    sl(n);

    for(int i=1; i<=n; i++)
    {
        sl(a[i]);
        mul*=a[i];
    }

    ll g=a[1], gg;
    p=a[1];
    for(int i=2; i<=n; i++)
    {
       g=__gcd(g,a[i]);

       gg=__gcd(p, a[i]);
       p*=a[i];
       p/=gg;
    }
    if(p==mul)
        cout<<"pairwise coprime";
    else if(g==1)
        cout<<"setwise coprime";
    else
        cout<<"not coprime";

}






