#include <bits/stdc++.h>
typedef long long ll;
typedef unsigned long long int ull;
#define base 31
#define MOD 1000000007
#define FOR(i, a, b) for(int i = a; i <= b; i++)
#define FORs(i, a, b) for(int i = a; i >= b; i--)
#define REP(i, a, b) for(int i = a; i < b; i++)
#define __FOR(i, a, b, k) for(int i = a; i <= b; i+= k)
#define __REP(i, a, b, k) for(int i = a; i < b; i+= k)
#define pb push_back
#define _io ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define Read_ freopen("input.inp", "r", stdin)
#define Write_ freopen("output.out", "w", stdout);
using namespace std;
typedef pair <int, int> ii;
typedef vector <ii> vii;
#define fi first
#define se second
#define mp make_pair
#define N  2000005
int n,arr[N],b[N];
int gcd(int a, int b)
{
    if (a == 0)
        return b;
    return gcd(b % a, a);
}


int findGCD(int arr[], int n)
{
    int result = arr[1];
    FOR(i,1,n)
    {
        result = gcd(arr[i], result);

        if(result == 1)
        {
           return 1;
        }
    }
    return result;
}

// Driver code

int findMaxGCD(int arr[], int n)
{

    int high = 0;
    FOR(i,1,n) high = max(high, arr[i]);


    int divisors[high + 10] = { 0 };


    FOR(i,1,n)
    {
        FOR(j,1,sqrt(arr[i]))
        {
            if (arr[i] % j == 0)
            {
                divisors[j]++;
                if (j != arr[i] / j)
                    divisors[arr[i] / j]++;
            }
        }
    }

    for (int i = high-1; i >= 2; i--){
            if (divisors[i] > 1)
            return i;
    }
}
void process(){

    int maxgcd=findMaxGCD(arr,n);
    if (findMaxGCD(arr,n)==1){
        cout<<"pairwise coprime";
        exit(0);
    }
    else if (findGCD(arr,n)==1){
        cout<<"setwise coprime";
        exit(0);
    }
    cout<<"not coprime";
}
int main()
{
    _io; 
    cin>>n;
    FOR(i,1,n) cin>>arr[i];
    //cout<<findMaxGCD(arr,n);
    process();
    return 0;
}
