#include <bits/stdc++.h>
#define sp putchar(' ')
#define en putchar('\n')
#define MOD(x) ((((x)%Mod)+Mod)%Mod)
#define int64_t int
const int MAXN = 500005 ;
using namespace std ;

int n , m ;
int64_t a ;

//int64_t mulEx(int64_t a,int64_t b,int64_t Mod) {///logn快速乘
//    if(!a) return 0;
//    int64_t ans(0) ;
//    while(b) {
//		if(b&1) ans = (ans+a)%Mod;
//		a <<= 1 ; a%=Mod ;
//		b >>= 1;
//    }
//
//    return ans ;
//}

inline int64_t mulEx(int64_t a,int64_t b,int64_t Mod){ ///O(1)快速乘
	return (a*b-(int64_t)((__float128)a/Mod*b)*Mod+Mod)%Mod;
}

int64_t powEx(int64_t base,int64_t n,int64_t Mod) {///快速幂
    int64_t ans(1);
    while(n) {
        if(n&1) ans = mulEx(ans,base,Mod);
        base = mulEx(base,base,Mod);
        n >>= 1;
    }
    return ans;
}

bool check(int64_t a,int64_t d,int64_t n) {
    if(n == a) return true;
    while(~d&1) d >>= 1;
    int64_t t = powEx(a,d,n);
    while(d < n-1 && t != 1 && t != n-1) {
        t = mulEx(t,t,n);
        d <<= 1;
    }
    return (d&1) || t == n-1;
}

bool isP(int64_t n) { ///判断大数是否是质数
    if(n <= 1) return false ;
    if(n == 2) return true;
    if(n < 2 || 0 == (n&1)) return false;
    static int p[5] = {2,3,7,61,24251};
    for(int i = 0; i < 5; ++i)
        if(!check(p[i],n-1,n)) return false;
    return true;
}

int64_t gcd(int64_t a,int64_t b) {
    if(a < 0) return gcd(-a,b);
    return b?gcd(b,a-b*(a/b)):a;
}

int64_t Pollard_rho(int64_t n,int64_t c) {///大数分解质因数

	int64_t i = 1,k = 2,x = rand()%n,y = x;
        while(true) {
        x = (mulEx(x,x,n) + c)%n;
        int64_t d = gcd(y - x,n);
        if(d != 1 && d != n) return d;
        if(y == x) return n;
        if(++i == k) {
            y = x;
            k <<= 1;
        }
    }
}
int64_t Fac[MAXN],factCnt;
///Fac存的是质因子,大小不一定按照顺序,有重复
void factorization(int64_t n) {
    if(n <= 1)return ;
    if(isP(n)) {
        Fac[factCnt++] = n;
        return;
    }
    int64_t p (n);
    while(p >= n) p = Pollard_rho(p,rand()%(n-1)+1);
    factorization(p);
    factorization(n/p);
}

unordered_map<int64_t,int64_t>factMap;
///遍历map的first表示因子,second表示次数

void getFactor(int64_t x)
{///不用判断是否是质数,但是比较费时间
 /**因此最好先判断一下是否是质数**/
	srand(time(0));
	factCnt = 0 ;
	factMap.clear();
	factorization(x);
	for(int i = 0; i < factCnt; ++i) ++ factMap[Fac[i]];
}

unordered_set<int64_t> s ;
int main()
{
    ios::sync_with_stdio(false) ;
    while(cin >> n) {
        s.clear() ;
        int64_t gcds ;
        bool isOk = true ;
        for(int i = 1;i <= n; ++i) {
            cin >> a ;
            gcds = (i == 1)?a:__gcd(gcds, a) ;
            getFactor(a) ;
            for(auto& it:factMap) {
                if(s.count(it.first)) {
                    isOk = false ;
                    break ;
                }
                s.insert(it.first) ;
            }
        }
        if(isOk) {
            cout << "pairwise coprime" << endl ;
        } else if(gcds == 1) {
            cout << "setwise coprime" << endl ;
        } else {
            cout << "not coprime" << endl ;
        }
    }
}
