#include <bits/stdc++.h>
#pragma GCC optimize(2)
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
const int MAX = 1e6 + 7;
const int mod = 1e9 + 7;
const int inf = 0x3f3f3f3f;
set<int> p;
vector<int> a(MAX, 0), ans(MAX, 0);
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    int t = a[i];
    for (int j = 2; j <= t; j++) {
      if (a[i] % j == 0) {
        p.insert(j);
        ans[j]++;
        a[i] /= j;
        while (a[i] % j == 0) a[i] /= j;
      }
      if (a[i] == 1) break;
    }
  }
  int f = 0;
  for (auto i : p)
    if (ans[i] == n) {
      cout << "not coprime";
      return 0;
    }
  for (auto i : p)
    if (ans[i] != 1) {
      cout << "setwise coprime";
      return 0;
    }
  cout << "pairwise coprime";
  return 0;
}
