/*
     “You just can’t beat the person who won’t give up.”
                                                            */
#include <bits/stdc++.h>
#define ll long long
#define oo 0x3f3f3f3f3f3f3f3fLL
#define lp(i,n) for(int i = 0;i < int(n);i++)
#define sz(s) (int)(s.size())
#define all(x) x.begin(), x.end()
#define allr(x) x.rbegin(), x.rend()
#define pb push_back
using namespace std;
const int maxn=2e5+5;
const  double EPS = 1e-9;
const int mod = 1e9+7;

inline void File()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
#endif
}

int main()
{
    ios_base::sync_with_stdio(0);
    File();
    int n;
    cin >> n;
    int pir = 0,sit=0;
    vector<int>arr(n);
    for(int &it : arr)
        cin >> it;
    sort(all(arr));
   vector<int>gcd(n-1);
   for(int i=0;i<n-1;i++)
     gcd[i] = __gcd(arr[i],arr[i+1]);
  vector<int>ans(n-2);
  for(int i=0 ;i<sz(gcd)-1;i++)
    ans[i] = __gcd(gcd[i],gcd[i+1]);
  for(int it : gcd){
     if(it == 1)
     ++pir;
    else
     ++sit;
  }
  for(int it : ans){
    if(it == 1)
     ++pir;
    else
     ++sit;
  }
   if(pir == 0)
    cout<<"not coprime";
   else if(pir > 0 and sit > 0)
     cout<<"setwise coprime";
   else
    cout<<"pairwise coprime";
}
