#include <bits/stdc++.h>
using namespace std;
long long min(long long a, long long b) {
  if (a < b)
    return a;
  else
    return b;
}
long long max(long long a, long long b) {
  if (a < b)
    return b;
  else
    return a;
}
long long min3(long long a, long long b, long long c) {
  return min(a, min(b, c));
}
long long max3(long long a, long long b, long long c) {
  return max(a, max(b, c));
}
long long NC = 100;
long long N = 1e9 + 7;
const long long S = 1e5 + 7;
long long mod(long long n);
long long gcd(long long a, long long b);
long long modM(long long n, long long m);
long long modA(long long n, long long m);
long long modS(long long n, long long m);
long long power(long long a, long long b);
void ipgraph(long long n, long long m);
vector<vector<long long>> v;
vector<bool> vis;
vector<long long> pr;
vector<long long> prime;
void printprime(long long n) {
  for (long long i = 0; i < n + 1; i++) pr[i] = i;
  pr[1] = 0;
  long long p = 2;
  while (p != -1) {
    for (long long i = pow(p, 2); i < n + 1; i++) {
      if (pr[i] % p == 0) pr[i] = 0;
    }
    for (long long i = p + 1; i < n + 1; i++) {
      if (pr[i] != 0) {
        p = pr[i];
        break;
      } else
        p = -1;
    }
    if (p == n) break;
  }
  for (long long i = 0; i < n + 1; i++) {
    if (pr[i] != 0) {
      prime.push_back(pr[i]);
    }
  }
}
void solve() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  string p = "pairwise coprime";
  string s = "setwise coprime";
  string none = "not coprime";
  long long hcf = gcd(a[0], a[1]);
  for (long long i = 2; i < n; i++) {
    hcf = gcd(hcf, a[i]);
  }
  if (hcf > 1) {
    cout << none;
    return;
  }
  if (n > 78500) {
    cout << s;
    return;
  }
  long long ma = *max_element(a.begin(), a.end());
  pr.resize(ma + 2, 0);
  printprime(ma + 1);
  pr.clear();
  unordered_map<long long, long long> mp;
  sort(a.begin(), a.end());
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < prime.size(); j++) {
      if (prime[j] > a[i]) break;
      if (a[i] % prime[j] == 0) {
        if (mp[prime[j]] > 0) {
          cout << s;
          return;
        } else
          mp[prime[j]]++;
      }
    }
  }
  cout << p;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  t = 1;
  while (t--) solve();
  cerr << endl
       << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
  return 0;
}
void ipgraph(long long n, long long m) {
  v.assign(n, {});
  vis.assign(n, 0);
  long long x, y;
  for (long long i = 0; i < m; i++) {
    cin >> x >> y;
    x--, y--;
    v[y].push_back(x);
    v[x].push_back(y);
  }
}
long long gcd(long long a, long long b) {
  if (b > a) return gcd(b, a);
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long power(long long a, long long b) {
  if (b == 0) return 1;
  long long c = power(a, b / 2);
  if (b % 2 == 0)
    return modM(c, c);
  else
    return modM(modM(c, c), a);
}
long long mod(long long n) { return (n % N + N) % N; }
long long modM(long long n, long long m) { return ((n % N * m % N) + N) % N; }
long long modA(long long n, long long m) { return ((n % N + m % N) + N) % N; }
long long modS(long long n, long long m) { return ((n % N - m % N) + N) % N; }
