#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
signed main() {
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long x = a[0];
  for (long long i = 1; i < n; i++) {
    x = gcd(x, a[i]);
  }
  long long flag = 0;
  for (long long i = 0; i < n; i++) {
    for (long long j = i + 1; j < n; j++) {
      if (gcd(a[i], a[j]) != 1) {
        flag = 1;
        break;
      }
    }
  }
  if (flag == 0) {
    cout << "pairwise coprime" << '\n';
    return 0;
  } else {
    if (x == 1) {
      cout << "setwise coprime" << '\n';
      return 0;
    } else {
      cout << "not coprime" << '\n';
    }
  }
}
