#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
const int N = 1e6 + 3;
int p[N], f[N + 1];
void sieve() {
  p[0] = p[1] = 1;
  for (int i = 2; i * i < N; i++) {
    if (p[i] == 0) {
      for (long long j = i * 1ll * i; j < N; j += i) {
        p[j] = i;
      }
    }
  }
  for (int i = 2; i < N; i++) {
    if (p[i] == 0) p[i] = i;
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  sieve();
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    f[p[x]]++;
  }
  int ans = 0;
  for (int i = 2; i <= 1e5; i++)
    if (f[i] != 0) ans++;
  if (ans == n) {
    cout << "pairwise coprime\n";
  } else if (ans > 1 && ans < n) {
    cout << "setwise coprime\n";
  } else
    cout << "not coprime\n";
  return 0;
}
