#include <bits/stdc++.h>

using namespace std;
typedef long long LL;

const int N = 1e6 + 5;
bool np[N + 10];
LL prime[N + 10], pi[N + 10];
LL mu[N + 10];
int getMu()
{
    int cnt = 0;
    np[0] = np[1] = true;
    mu[1] = 1;
    for (int i = 2; i < N; ++i)
    {
        if (!np[i])
            prime[++cnt] = i, mu[i] = -1;
        for (int j = 1; j <= cnt && i * prime[j] < N; ++j)
        {
            np[i * prime[j]] = true;
            if (i % prime[j] == 0)
            {
                mu[i * prime[j]] = 0;
                break;
            }
            else
            {
                mu[i * prime[j]] = -mu[i];
            }
        }
    }
    return cnt;
}
int a[N];
int vis[N + 10];
int main()
{
    int n;
    int cntpri = getMu();
    scanf("%d", &n);
    for (int i = 1; i <= n; i++)
    {
        scanf("%d", a + i);
    }
    int flag1 = a[1];
    for (int i = 2; i <= n; i++)
    {
        flag1 = __gcd(flag1, a[i]);
    }
    int flag2 = 1;
    for (int i = 1; i <= n; i++)
    {
        int ii = 1;
        int tmpi = a[i];
        while (prime[ii] * prime[ii] <= tmpi)
        {
            if (tmpi % prime[ii] == 0)
            {
                vis[prime[ii]]++;
                if (vis[prime[ii]] == 2)
                {
                    flag2 = 0;
                    break;
                }
                while (tmpi % prime[ii] == 0)
                {
                    tmpi /= prime[ii];
                }
            }
            ii++;
        }
        if (tmpi > 1)
        {
            vis[tmpi]++;
            if (vis[prime[ii]] == 2)
            {
                flag2 = 0;
                break;
            }
        }
        if (flag2 == 0)
            break;
    }
    if (flag2 == 1)
    {
        printf("pairwise coprime\n");
    }else if (flag1 == 1)
    {
        printf("setwise coprime\n");
    }else
    {
        printf("not coprime\n");
    }
    int T;
    cin >> T;
    
}