#include <bits/stdc++.h>
using namespace std;
void cmax(int& x, const int& y) { x = x > y ? x : y; }
void cmin(int& x, const int& y) { x = x < y ? x : y; }
const int N = 1e6 + 1;
vector<int> d[N];
int cnt[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  for (int i = 1; i <= N - 1; i++)
    for (int j = i; j < N; j += i) d[j].push_back(i);
  int n;
  cin >> n;
  vector<int> a(n);
  for (auto& i : a) cin >> i;
  for (auto i : a)
    for (auto x : d[i]) ++cnt[x];
  bool flag = false;
  for (int i = 2; i <= N - 1; i++) flag |= cnt[i] == n;
  if (flag == true) {
    cout << "not coprime";
    return 0;
  }
  for (int i = 2; i <= N - 1; i++) flag |= cnt[i] > 1;
  if (flag == true) {
    cout << "setwise coprime";
    return 0;
  }
  cout << "pairwise comprime";
  return 0;
}
