#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <numeric>
#include <utility>
#include <climits>
#include <ctime>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <cstring>

// ---------- PBDS -----------------

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp> 
#include <ext/pb_ds/detail/standard_policies.hpp>

// ----------------------------------

using namespace std;
using namespace __gnu_pbds; 

#define MEM(a, b) memset(a, (b), sizeof(a))
#define ALL(a) a.begin(), a.end()
#define MP(a, b) make_pair(a, b)
#define PB(a) push_back(a)
#define EB(a) emplace_back(a) 
#define boost ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0),cout << fixed << setprecision(10);
// #define ll long long int
//#define int long long int

#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
	*this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
// debug & operator << (debug & dd, P p) { dd << "(" << p.x << ", " << p.y << ")"; return dd; }
#define deb(x) debug() << imie(x)

int const N = 1e6 + 5;

void solve(){
    
    int spf[N];
    
    MEM(spf, 0);

    
    for(int i = 2; i < N; i++){
        if(spf[i] == 0){
            for(int j = i; j < N; j += i)
            spf[j] = i;
        }
    }
    
    int n;
    cin >> n;
    
    int cou[N];
    
    MEM(cou, 0);
    
    for(int i = 0; i < n; ++i){
        int x; cin >> x;
        
        while(x != 1){
            
            cou[spf[x]]++;
            int num = spf[x];
            while(x % num == 0)
                x /= num;
        }
    }
    
    int max_num = *max_element(cou, cou + N);
        
    if(max_num == 1){
        cout << "pairwise coprime";
    }else if(max_num != n){
        cout << "setwise coprime";
    }else{
        cout << "not coprime";
    }
    
}

int32_t main(){

	boost;

	int T;
	
	//cin >> T;
	 T = 1;
	
	for(int i = 1; i <= T; ++i){
		solve();
		cout << "\n";
	}

	return 0;
}

