#include <bits/stdc++.h>
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <unordered_map>
#include <vector>
#include <map>
#include <list>
#include <queue>
#include <cstring>
#include <cstdlib>
#include <ctime>
#include <cmath>
#include <stack>
#include <set>
#include <bitset>
#include <deque>
#pragma GCC optimize(3 , "Ofast" , "inline")
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
using namespace std ;
#define ios ios::sync_with_stdio(false) , cin.tie(0) , cout.tie(0)
#define x first
#define y second
#define pb push_back
#define ls rt << 1
#define rs rt << 1 | 1
typedef long long ll ;
const double esp = 1e-6 , pi = acos(-1) ;
typedef pair<int , int> PII ;
const int N = 1e6 + 10 , INF = 0x3f3f3f3f , mod = 1e9 + 7;
int a[N] ;
int work()
{
  int n ;
	scanf("%d" , &n) ;
  unordered_map<int , int> mp ;
	int flag = 1 ;
	for(int i = 1; i <= n ;i ++ ) {
		scanf("%d" , &a[i]) ;
		int t = a[i] ;
		if(flag)
		for(int j = 2 ;j * j <= t ;j ++ ) {
			if(t % j == 0) {
				if(mp[j]) {
					flag = 0 ;
					break ;
				}
        mp[j] = 1 ;
				while(t % j == 0) t /= j ;
			}
		}
		if(t > 1) {
			if(mp[t]) {
				flag = 0 ;
			}else mp[t] = 1 ;
		}
	}
	if(flag) puts("pairwise coprime") ;
	else {
		int ans = a[1] ;
		for(int i = 2; i <= n ;i ++ )
		 ans = __gcd(ans , a[i]) ;
		if(ans == 1) puts("setwise coprime") ;
		else puts("not coprime") ;
	}
  return 0 ;
}
int main()
{
  //   freopen("C://Users//spnooyseed//Desktop//in.txt" , "r" , stdin) ;
  //   freopen("C://Users//spnooyseed//Desktop//out.txt" , "w" , stdout) ;

  work() ;
  return 0 ;
}
/*
*/
