#include <bits/stdc++.h>
using namespace std;
long long int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
bool status[1100002];
void siv() {
  int N = 1000000;
  int sq = sqrt(N);
  for (int i = 4; i <= N; i += 2) status[i] = 1;
  for (int i = 3; i <= sq; i += 2) {
    if (status[i] == 0) {
      for (int j = i * i; j <= N; j += i) status[j] = 1;
    }
  }
}
int main() {
  siv();
  long long int a[100000], p = 0;
  for (int i = 2; i < 10000; i++) {
    if (!status[i]) {
      a[p++] = i;
    }
  }
  int n;
  cin >> n;
  long long int b[n + 9];
  for (int i = 0; i < n; i++) {
    cin >> b[i];
  }
  long long int ans = b[0];
  for (int i = 1; i < n; i++) {
    ans = gcd(ans, b[i]);
  }
  if (ans != 1)
    cout << "not coprime" << endl;
  else {
    long long int i, j;
    ans = 0;
    long long int s = 0, ok = 0;
    for (i = 0; i < p; i++) {
      s = 0, ok = 0;
      for (j = 0; j < n; j++) {
        ok = gcd(a[i], b[j]);
        if (ok != 1) s++;
      }
      ans = max(s, ans);
    }
    if (ans == 1)
      cout << "pairwise coprime" << endl;
    else
      cout << "setwise coprime" << endl;
  }
}
