#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
vector<bool> eratosthenes_sieve(int n) {
  vector<bool> res(n + 1, true);
  res[0] = res[1] = false;
  for (int i = 2; i <= n; i++) {
    if (res[i]) {
      for (int j = i; i * j <= n; j++) res[i * j] = false;
    }
  }
  return res;
}
int n;
vector<long long> a;
int m = 1000000;
bool isPairwise() {
  vector<vector<int>> pfs(m + 1);
  for (int i = 2; i * i <= m; i++) {
    if (pfs[i].size() == 0) {
      for (int j = 1; i * j <= m; j++) {
        pfs[i * j].push_back(i);
      }
    }
  }
  vector<bool> used(m + 1, false);
  for (int i = 0; i < n; i++) {
    for (auto e : pfs[a[i]]) {
      if (used[e]) {
        return false;
      } else {
        used[e] = true;
      }
    }
  }
  return true;
}
bool isSetwise() {
  long long res = 0;
  for (int i = 0; i < n; i++) {
    res = gcd(res, a[i]);
  }
  return res == 1;
}
int main() {
  cin >> n;
  a.resize(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (isPairwise()) {
    cout << "pairwise coprime" << endl;
  } else if (isSetwise()) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
