#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, i, j, s = 0;
  cin >> n;
  long long int ar[n];
  for (i = 0; i < n; i++) {
    cin >> ar[i];
  }
  int f = 0;
  long long int result = ar[0];
  for (i = 1; i < n; i++) {
    result = gcd(ar[i], result);
    if (result == 1) break;
  }
  if (result == 1) {
    f = 1;
  } else {
    cout << "not coprime";
    return 0;
  }
  for (i = 0; i < n; i++) {
    for (j = i + 1; j < n; j++) {
      if (gcd(ar[i], ar[j]) != 1) {
        f = 0;
        break;
      }
    }
    if (f == 0) break;
  }
  if (f == 1) {
    cout << "pairwise coprime";
  } else
    cout << "setwise coprime";
}
