#include <iostream>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <climits>
#include <vector>
#include <cstring>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <string.h>
#include <iomanip>
using namespace std;
#define int long long
#define ull unsigned long long
#define F first
#define S second
#define nl "\n"
#define ld long double
#define div 1000000007
#define pi 3.14159265358979323846
#define pb push_back
const int N=1e6+1;
int prime[N];

void seive()
{
    memset(prime,-1,sizeof(prime));
    for(int i=2;i*i<=N;i++)
    {
        if(prime[i]==-1)
        {
            prime[i]=i;
            for(int j=i*i;j<=N;j+=i)
                prime[j]=i;
        }
    }
}

void solve()
{
    seive();
    int n;cin>>n;
    int a[n];
    for(int i=0;i<n;i++)
        cin>>a[i];
    int g=a[0];
    for(int i=1;i<n;i++)
        g=__gcd(g,a[i]);
    if(g!=1)
    {
        cout<<"not coprime\n";
        return;
    }
    set<int> s;bool f=1;
    for(int i=0;i<n;i++)
    {
        set<int> temp;
        int x=a[i];
        while(prime[x]!=-1)
        {
            int d=prime[x];
            temp.insert(d);
            x/=d;
        }
        for(auto it:temp)
        {
            if(s.find(it)!=s.end())
            {
                f=0;
                break;
            }
            s.insert(it);
        }
    }
    if(f)
        cout<<"pairwise coprime\n";
    else
        cout<<"setwise coprime\n";
}

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);

    int t=1;
    //cin>>t;
    while(t--)
    {
        solve();
    }
    return 0;
}
