#include <bits/stdc++.h>
#pragma GCC optimize(3)
using namespace std;
int n, x, num[1000005], pp = 1;
vector<int> v;
bool nprim[1000005];
int main() {
  cin >> n;
  for (int i = 2; i * i <= 1000000; ++i)
    if (!nprim[i])
      for (int j = i * i; j <= 1000000; j += i) nprim[j] = 1;
  for (int i = 2; i <= 1000000; ++i)
    if (!nprim[i]) v.push_back(i);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &x);
    if (x == 1) continue;
    for (int j = 0; v[j] <= x; ++j)
      if (x % v[j] == 0) {
        ++num[v[j]];
        if (num[v[j]] > 1) pp = 0;
        if (num[v[j]] == n) {
          cout << "not coprime";
          return 0;
        }
      }
  }
  if (pp)
    cout << "pairwise coprime";
  else
    cout << "setwise coprime";
  return 0;
}
