#include <bits/stdc++.h>
using namespace std;
int n, arr[1000005], b[1000005];
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int findGCD(int arr[], int n) {
  int result = arr[1];
  for (int i = 1; i <= n; i++) {
    result = gcd(arr[i], result);
    if (result == 1) {
      return 1;
    }
  }
  return result;
}
void process() {
  if (findGCD(arr, n) != 1) {
    cout << "no coprime";
    exit(0);
  } else {
    for (int i = 1; i <= n - 1; i++) {
      memset(b, 0, sizeof(b));
      int cnt = 0;
      for (int j = i + 1; j <= n; j++) {
        b[++cnt] = arr[j];
      }
      sort(b + 1, b + 1 + cnt);
      for (int k = 1; k <= cnt; k++) {
        if (gcd(arr[i], b[k]) != 1) {
          cout << "setwise coprime";
          exit(0);
        }
      }
    }
    cout << "pairwise coprime";
    exit(0);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> arr[i];
  process();
  return 0;
}
