#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long INF = 1e15;
long long gcd(long long x, long long y) {
  if (x > y) swap(x, y);
  if (x == 0) return y;
  return gcd(x, y % x);
};
vector<bool> flag_prime(long long max) {
  vector<bool> flag(max, true);
  flag[0] = false;
  flag[1] = false;
  for (long long i = 2; i * i < max + 1; i++) {
    if (flag[i]) {
      for (long long j = 2; i * j < max + 1; j++) flag[i * j] = false;
    }
  }
  return flag;
}
vector<long long> num_prime(long long max) {
  vector<long long> num;
  vector<bool> flag = flag_prime(max);
  for (long long i = 0; i < max + 1; i++) {
    if (flag[i]) num.push_back(i);
  }
  return num;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long Max = 1000000 + 10;
  vector<long long> prime = num_prime(1000 + 10);
  vector<long long> seen(Max, 0);
  bool pc = true;
  sort(a.begin(), a.end());
  vector<int> cnt(n, 0);
  for (long long i = 0; i < n; i++) {
    bool w = false;
    if (seen[a[i]] > cnt[i]) {
      pc = false;
      break;
    }
    if (a[i] == 1) continue;
    for (long long j = 0; j < (int)prime.size(); j++) {
      if (a[i] % prime[j] == 0) {
        if (seen[prime[j]] > 0) pc = false;
        w = true;
        cnt[i]++;
        for (long long k = 1; k * prime[j] <= Max; k++) {
          seen[k * prime[j]]++;
        }
      } else if (sqrt(a[i]) < prime[j])
        break;
    }
    if (!w) {
      cnt[i]++;
      for (long long j = 1; j * a[i] <= Max; j++) {
        seen[j * a[i]]++;
      }
    }
  }
  for (int i = 0; i < (int)prime.size(); i++) {
    if (seen[prime[i]] > 1) {
      pc = false;
      break;
    }
  }
  for (int i = 0; i < n; i++) {
    if (seen[a[i]] > cnt[i]) {
      pc = false;
      break;
    }
  }
  if (pc) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long long g = gcd(a[0], a[1]);
  for (long long i = 0; i < n; i++) {
    g = gcd(g, a[i]);
  }
  if (g == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
