#include <bits/stdc++.h>
using namespace std;
long long spf[1000006];
map<long long, long long> pcnt;
void seive() {
  spf[1] = 1;
  for (long long i = 2; i < 1000006; i++) spf[i] = i;
  for (long long i = 4; i < 1000006; i += 2) spf[i] = 2;
  for (long long i = 3; i * i < 1000006; i++) {
    if (spf[i] == i)
      for (long long j = i * i; j < 1000006; j += i)
        if (spf[j] == j) spf[j] = i;
  }
}
set<long long> factors(long long x) {
  set<long long> v;
  while (x != 1) {
    v.insert(spf[x]);
    x = x / spf[x];
  }
  return v;
}
long long ggcd(long long a, long long b) {
  if (a == 0) return b;
  return ggcd(b % a, a);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  seive();
  long long n, flag = 0;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  set<long long> k = factors(a[0]);
  for (auto i : k) pcnt[i]++;
  for (long long i = 1; i < n; i++) {
    set<long long> ans = factors(a[i]);
    for (auto i : ans) {
      if (pcnt[i] == 1) {
        flag = 1;
        break;
      }
    }
    if (flag == 1) break;
  }
  if (flag == 0)
    cout << "pairwise coprime";
  else {
    long long gcd = a[0];
    for (long long i = 1; i < n; i++) gcd = ggcd(a[i], gcd);
    if (gcd == 1)
      cout << "setwise coprime";
    else
      cout << "not coprime";
  }
  return 0;
}
