#include <bits/stdc++.h>
using namespace std;
int n;
int a[1000005];
int cnt[1000005];
bool pairwise = true;
int gcd(int x, int y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    cnt[a[i]]++;
  }
  for (int i = 2; i < n; i++) {
    int t = 0;
    for (int j = i; j < 1000005; j += i) t += cnt[j];
    if (t > 1) pairwise = false;
  }
  if (pairwise == true) {
    cout << "pairwise coprime";
    return 0;
  }
  int ans = a[0];
  for (int i = 1; i < n; i++) ans = gcd(ans, a[i]);
  if (ans > 1) {
    cout << "not coprime";
    return 0;
  } else
    cout << "setwise coprime";
  return 0;
}
