#include <bits/stdc++.h>
using namespace std;
long long int a[1000001];
bool pre[1000001];
bool prime[1000001];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i], pre[a[i]] = true;
  memset(prime, true, 1000001);
  long long int ans = 0;
  for (int i = 2; i <= 1000; i++) {
    long long int cnt = 0;
    if (prime[i]) {
      for (int j = i * i; j <= 1000000; j += i) {
        if (pre[j]) cnt++;
        prime[j] = false;
      }
      ans = max(ans, cnt);
      if (ans == n) break;
    }
  }
  if (ans == 1)
    cout << "pairwise coprime" << endl;
  else if (ans == n)
    cout << "not coprime" << endl;
  else
    cout << "setwise coprime" << endl;
  return 0;
}
