#include <bits/stdc++.h>
using namespace std;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, -1, 0, 1};
const int LIT = 1e9 + 7;
int n, m;
vector<bool> prime(1000001, true);
set<int> s;
void solve() {
  for (int i = 2; i <= (int)sqrt(n); i++) {
    for (int j = i + i; j <= n; j += i) {
      prime[j] = false;
    }
  }
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    for (int j = 2; j <= x; j++) {
      if (prime[j]) {
        if (x % j == 0) {
          s.insert(j);
          break;
        }
      }
    }
  }
  int k = s.size();
  if (k == 1)
    cout << "not coprime";
  else if (k == n)
    cout << "pairwise coprime";
  else
    cout << "setwise coprime";
}
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(false);
  solve();
  return 0;
}
