/*------------------------------------
........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;

int c[1000005];

inline void solve(){
    int n; cin>>n; 
    int g=0,mx=0;
    for (int i=0,a;i<n;i++){
        cin >> a ; 
        c[a]++;
        g = __gcd(mx,a);
    }
    if (g != 1){
        cout << "not coprime" << endl;
        return ;
    }
    int p=1;
    for (int i=2;i<=1000000;i++){
        int cur=0;
        for (int j=i;j<=1000000;j+=i) cur += c[j];
        if (cur>1) {
            p = 0; break;
        }
        if (i&1) i++;
    }
    if (p>0) cout << "pairwise coprime" << endl;
    else cout << "setwise coprime" << endl;
}

signed main()
{
    int n=1; // cin>>n;
    while (n--) solve();
    return 0;
}
// https://atcoder.jp/contests/abc177/tasks/abc177_e
