// #pragma GCC optimize ("O3")
// #pragma GCC target   ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx")
// #pragma GCC optimize ("Ofast,no-stack-protector")
// #pragma GCC optimize ("unroll-loops")
// #pragma GCC optimize ("fast-math")
// #pragma comment(linker, "/stack:200000000")

#include <bits/stdc++.h>
using namespace std;

typedef long long int      ll;
typedef long double        ld;
typedef unsigned long long ull;
typedef vector<ll>         vl;
typedef vector<vl>         vvl;
typedef pair<ll,ll>        pll;
typedef vector<pll>        vpll;

#define ff          first
#define ss          second
#define pb          push_back
#define mp          make_pair
#define mt          make_tuple
#define eb          emplace_back
#define fr(i,n)     for(ll i = 0; i < n; ++i)
#define frs(i,s,n)  for(ll i = s; i < n; ++i)
#define frb(i,s,e)  for(ll i = s; i <= e; ++i)
#define rfr(i,n)    for(ll i = n-1; i >= 0; i--)
#define frbr(i,e,s) for(ll i = e; i >= s; i--)
#define all(x)      (x).begin(), (x).end()
#define sz(x)       ((ll)(x).size())

template <typename A, typename B>
string to_string(pair<A, B> p);
 
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);
 
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);
 
string to_string(const string& s) 
{
  return '"' + s + '"';
}
 
string to_string(const char* s) 
{
  return to_string((string) s);
}
 
string to_string(bool b) 
{
  return (b ? "true" : "false");
}
 
string to_string(vector<bool> v) 
{
  bool first = true;
  string res = "{";
  for(int i = 0; i < static_cast<int>(v.size()); i++) 
  {
    if(!first) 
       res += ", ";
    first = false;
    res += to_string(v[i]);
  }
  res += "}";
  return res;
}
 
template <size_t N>
string to_string(bitset<N> v) 
{
  string res = "";
  for(size_t i = 0; i < N; i++) 
    res += static_cast<char>('0' + v[i]);
  return res;
}
 
template <typename A>
string to_string(A v) 
{
  bool first = true;
  string res = "{";
  for(const auto &x : v) 
  {
    if(!first) 
       res += ", ";
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
 
template <typename A, typename B>
string to_string(pair<A, B> p) 
{
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
 
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) 
{
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ")";
}
 
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) 
{
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}
 
void debug_out() { cerr << "]\n"; }
 
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) 
{
  cerr << to_string(H);
  if(sizeof...(T)) 
     cerr << ", "; 
  debug_out(T...);
}

clock_t start_time = clock();
double get_current_time() 
{
  return ((double)(clock() - start_time)) / CLOCKS_PER_SEC;
} 

#ifdef LOCAL
#define dbg(...)       {cerr << "[" << #__VA_ARGS__ << "] = [", debug_out(__VA_ARGS__);}
#define dbg_arr(a,n)   {cerr << "[" << #a << "] = [ "; fr(i,n) cerr << a[i] << " "; cerr << "]\n";}
#define dbg_mat(m,r,c) {cerr << "[" << #m << "]:\n"; fr(i,r) {cerr << "[ "; fr(j,c) cerr << m[i][j] << " "; cerr << "]\n";}}
#define dbg_time()     {cerr << "\n" << "Time elapsed: " << get_current_time() << "\n\n\n";}
#else
#define dbg(x...)      {}
#define dbg_arr(a,n)   {}
#define dbg_mat(m,r,c) {}
#define dbg_time()     {}
#endif

const ld PI   = acos(-1);
const ld EPS  = 1e-9;
const ll INF  = 1e18;
const ll SINF = 1e9;
const ll MOD  = 1e9+7; // 998244353;
const ll MAX  = 100100;

    
namespace factorizer 
{
    const ll N = 1'000'100;
    ll lp[N+1];
    vl pr;
 
    void sieve()
    {
        for (ll i = 2; i <= N; ++i) 
        {
            if (lp[i] == 0) 
            {
                lp[i] = i;
                pr.eb(i);
            }
            for (ll j = 0; j < sz(pr) && pr[j] <= lp[i] && 1LL * i * pr[j] <= N; ++j)
                lp[i * pr[j]] = pr[j];
        }
    }
 
    vpll pfact(ll x)
    { 
        vpll factors;
        while(x > 1)
        {
            ll cnt = 0;
            ll p = lp[x];
            while(x % p == 0)
            {
                x /= p;
                cnt++;
            }
            factors.eb(p, cnt);
        }
        return factors;
    }
 
    vl build_divisors(const vpll & factors) 
    {
        vl divisors = {1};
        for (auto & p : factors) 
        {
            ll size = sz(divisors);
            fr(i, size) 
            {
                ll cur = divisors[i];
                fr(j, p.ss)
                {
                    cur *= p.ff;
                    divisors.pb(cur);
                }
            }
        }
        sort(all(divisors));
        return divisors;
    }

    vl divisors(ll x)
    {
        vpll v1 = pfact(x);
        vl v;
        for(auto p: v1)
          v.pb(p.ff);
        return v;
    }
}

using namespace factorizer;


        
ll gcd(ll a, ll b) 
{
  while(b) 
  {
    a %= b;
    swap(a, b);
  }
  return a;
}

ll lcm(ll a, ll b) 
{
  return a / gcd(a, b) * b;
}


void pre()
{
  factorizer::sieve();
  // prepare_factorials();
}

void solve()
{
  ll n; cin >> n;
  vl arr(n);
  fr(i, n)
   cin >> arr[i]; 
  map < ll, ll > mp;
  ll gg = arr[0];
  frs(i, 1, n)
   gg = gcd(gg, arr[i]);
  if(gg != 1)
  {
    cout << "not coprime" << "\n";
    return;
  }
  else
  {
    fr(i, n)
    {
      vl v = divisors(arr[i]);
      for(auto x: v)
      {
        if(x > 1)
        {
          if(mp[x])
          {
            cout << "setwise coprime" << "\n";
            return;
          }
          mp[x]++;
        }
      }
    }
    cout << "pairwise coprime" << "\n";
    return;
  }
}



signed main()
{  
  ios::sync_with_stdio(false);
  cin.tie(0); cout.tie(0);

  // cout << fixed << setprecision(15);

  #ifdef LOCAL
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
  #endif

  pre();

  ll t = 1;
  // cin >> t;
  frb(CASE, 1, t)
  {
    // cout << "Case #" << CASE << ": ";
    // dbg(CASE);
    solve();
  }

  dbg_time();
  
  return 0;
}     
     


Measured memory_bytes: 19716