#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<string, int>;
using mp = map<int, int>;
const int MOD = 1e9 + 7;
const int INF = 1001001001;
int a[1000005];
void enum_divisors(int N) {
  for (int i = 1; i * i <= N; ++i) {
    if (N % i == 0) {
      a[i]++;
      if (N / i != i) a[N / i]++;
    }
  }
}
int main(void) {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    int a;
    cin >> a;
    enum_divisors(a);
  }
  for (int i = 2; i < 1000005; ++i) {
    if (a[i] == n) {
      cout << "not coprime"
           << "\n";
      return 0;
    }
  }
  for (int i = 2; i < 1000005; ++i) {
    if (1 < a[i] && a[i] < n) {
      cout << "setwise coprime"
           << "\n";
      return 0;
    }
  }
  cout << "pairwise coprime"
       << "\n";
  return 0;
}
