#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("avx2")
#pragma optimize("JARU SOSISONI")
using namespace std;
const long double two = 2;
const long long INF = 2e18 + 100;
const long long MOD = 998244353;
const long long MOD1 = 1e9 + 7;
const long long N = 1e6 + 10;
const long long nul = 0;
const long long SIZE = 1e6 * 3;
set<long long> smth;
long long gcd(long long a, long long b) {
  while (a * b != 0) {
    a %= b;
    swap(a, b);
  }
  return a + b;
}
bool flag = 0;
void fact(long long a) {
  long long d = 2;
  set<long long> dd;
  while (d * d <= a) {
    if (a % d == 0) {
      if (smth.find(d) != smth.end()) flag = 1;
      dd.insert(d);
      a /= d;
    } else
      d++;
  }
  if (a > 1) {
    if (smth.find(a) != smth.end()) flag = 1;
    dd.insert(a);
  }
  for (long long i : dd) smth.insert(i);
}
signed main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  ;
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long &i : a) cin >> i;
  long long ans = a[0];
  for (long long i = 0; i < n; i++) {
    ans = gcd(ans, a[i]);
    fact(a[i]);
  }
  if (flag == 0)
    cout << "pairwise coprime\n";
  else if (ans == 1)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
}
