/*------------------------------------
........Bismillahir Rahmanir Rahim....
..........created by Abdul Aziz.......
------------------------------------*/
#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <cmath>
#include <vector>
#include <set>
#include <list>
#include <stack>
#include <map>
#include <cstring>
#include <unordered_map>
#include <queue>
#define   mod  998244353
#define   int  long long 
#define   ld   long double
#define   pb   push_back
#define   vi  vector<int> 
#define   dbg(x)  cerr << #x << " = " << x << '\n'
#define   sz(x)  (int)x.size()
#define   all(a) (a.begin(),a.end())
#define   ff   first
#define   ss   second
#define   pii  pair<int,int> 
#define   lcm(a,b) (a*b)/__gcd(a,b) 
using namespace std;


inline void solve(){
    map <int,int> c;
    int n; cin>>n; 
    vi a(n);
    int g=0,mx=0,e=0;
    for (int i=0;i<n;i++){
        cin >> a[i] ; 
        g = __gcd(g,a[i]);
        c[a[i]]++;
        mx = max(mx,a[i]);
        if (a[i]%2==0) e++;
    }
    bool ok=true;
    for (int i=2;i*i<=mx;i++){
        if ((e>1) or (n>78498 and mx>1)) {
          ok = false; break;
        }
        int cur=0;
        for (int j=i;j<=mx;j+=i){
            if (j==i) {
              cur+=c[i]; 
              if (cur>1) break;
            }
            else {
                if (c[j]>0) cur += c[j];
                if (cur>1) break;
            }
        }
        if (cur>1) {
            ok=false; 
            break;
        }
    }
    if (g != 1) cout << "not coprime" << endl;
    else if (ok) cout << "pairwise coprime" << endl;
    else cout << "setwise coprime" << endl;
}

signed main()
{
    int n=1; // cin>>n;
    while (n--) solve();
    return 0;
}
