#include<bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/tree_policy.hpp>
#include<cstdio>
#include<vector>
#include<stdio.h>
#include<cstring>
#include<algorithm>
#include<string>
#include<iostream>
#include<map>
#include<set>
#include<queue>
#include<set>
#define READ                freopen("in.txt", "r", stdin)
#define WRITE               freopen("out.txt", "w", stdout)
#define INF9                1000000010
#define INF18               1000000000000000010
#define dist(ax,ay,bx,by)   sqrt((ax-bx)*(ax-bx)+(ay-by)*(ay-by))
#define gcd(a,b)            __gcd(a,b)
#define lcm(a,b)            (a*b)/__gcd(a,b)
#define m_p(a,b)            make_pair(a,b)
#define sqr(a)              ((a)*(a))
#define pb                  push_back
#define bpll(a)             __builtin_popcountll(a)
#define MX                  200006
#define PI                  acos(-1)
#define mod                  1000000007
#define cnt_bin(n)          __builtin_clzll(0ll) - __builtin_clzll(n)

typedef long long lli;
using namespace std;

bool mark[2005];
vector<lli>primes;
lli n, m, k;

bool check(lli n)
{
    if(n<2) return false;
    if(n==2) return true;
    if(n%2==0) return false;
    return mark[n]==false;
}

void sieve(lli n)
{
    for(lli i=3; i*i<=n; i+=2)
    {
        if(mark[i]==false)
        {
            for(lli j=i*i; j<=n; j+=2*i) mark[j]=true;
        }
    }
}

map<lli, lli>mp;

vector<lli>ara;

int main()
{
    // READ;
    sieve(2000);

    for(lli i=0; i<2000; i++)
    {
        if(check(i)) primes.push_back(i);
    }

    lli n;
    scanf("%lld", &n);

    lli gc= 0;

    for(lli i=0; i<n; i++)
    {
        lli a;
        scanf("%lld", &a);
        ara.push_back(a);
        gc= gcd(gc, a);
    }

    bool found= true;

    for(lli x=0; x<n; x++)
    {
        lli num= ara[x];

        for(lli i=0; i<primes.size() && primes[i]*primes[i]<=num; i++)
        {
            if(num%primes[i]==0)
            {
                mp[i]++;
                if(mp[i]>1) found=false;

                while(num%primes[i]==0)
                {
                    num/=primes[i];
                }
            }
        }

        if(num>1)
        {
            mp[num]++;
            if(mp[num]>1) found=false;
        }
    }

    if(found) cout<<"pairwise coprime"<<endl;
    else if(gc==1) cout<<"setwise coprime"<<endl;
    else cout<<"not coprime"<<endl;

    return 0;
}
