#include <bits/stdc++.h>
using namespace std;
typedef long long int           i64;
typedef pair<int, int>          pii;
typedef vector<int>             vi;
typedef vector<double>          vd;
typedef vector<string>          vs;
typedef vector<pair<int, int> > vii;
#define all(c)              c.begin(), c.end()
#define clr(x,y)            memset(x,y,sizeof x)
#define MOD                 1000000007
#define eps                 1e-9
#define INF                 0x3f3f3f3f3f3f3f3f // 4,557,430,888,798,830,399
#define inf                 0x3f3f3f3f // 1,061,109,567
#define PI                  acos(-1.0)  // 3.1415926535897932
#define max3(x, y, z)       max(max(x, y), z)
#define min3(x, y, z)       min(min(x, y), z)
#define to_lower(x)         transform(x.begin(), x.end(), x.begin(), ::tolower)
#define to_upper(x)         transform(x.begin(), x.end(), x.begin(), ::toupper)
#define vin(x)              for(auto &m : x) cin >> m;
#define f                   first                
#define s                   second
#define lcm(x, y)           (x * y) / __gcd(x, y)      
 
int dr[] = {-1, 0, 1,  0};
int dc[] = { 0, 1, 0, -1};
int dx[] = {+0,+0,+1,-1,-1,+1,-1,+1};
int dy[] = {-1,+1,+0,+0,+1,+1,-1,-1};
int hr[] = {1, 1, 2, 2,-1,-1,-2,-2};
int hc[] = {2,-2, 1,-1, 2,-2, 1,-1};
 
#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
    cerr << *it << " = " << a << endl;
    err(++it, args...);
}
 
template<typename T> T power(T n, T p){ T res = 1; while(p > 0){ if(p & 1)  res *= n;n *= n; p >>= 1;} return res;}
template<typename T> T bigmod(T n, T p, T m){ n %= m; T res = 1; while(p > 0){ if(p & 1) res = res * n % m; n = n * n % m; p >>= 1; } return res;}
 
const int maxN = 1002;
int prime[maxN], p_index;
bool mark[maxN];
bool sive(){
    int limit= sqrt(maxN * 1.0) + 2;
    prime[0] = prime[1] = true;
    prime[p_index++] = 2;
    for(int i = 4; i < maxN; i += 2)
        prime[i] = true;
    for(int i= 3; i < maxN; i += 2)
        if(!mark[i]){
            prime[p_index++] = i;
            if(i <= limit)
                for(int j = i * i; j < maxN; j += i * 2)
                    mark[j] = true;
        }
}
int main(){
    #ifndef ONLINE_JUDGE
        clock_t tStart = clock();
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif
    sive();
    int n;
    cin >> n;
    int arr[n], num = 0;
    for(int i= 0; i < n; i++){
        scanf("%d", &arr[i]);
        num = max(num, arr[i]);
    }
    int sa = __gcd(arr[0], arr[1]);
    for(int i = 2; i < n; i++){
        sa = __gcd(sa, arr[i]);
    }
    bool pairWise = true;
    for(int i = 0; i < p_index && prime[i] <= num; i++){
        int cnt = 0;
        for(int j = 0; j < n; j++)
            cnt += arr[j] % prime[i] == 0;
        if(cnt >= 2)
            pairWise = false;
    }
    if(pairWise)
        cout << "pairwise coprime\n";
    else if(sa == 1)
        cout << "setwise coprime\n";
    else
        cout << "not coprime\n";
    #ifndef ONLINE_JUDGE
        fprintf(stderr, "\n>> Runtime: %.10fs\n", (double) (clock() - tStart) / CLOCKS_PER_SEC);
    #endif
    return 0;
}
 
