#include <bits/stdc++.h>
using namespace std;
using Pii = pair<int, int>;
using Pll = pair<long long, long long>;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
char alpha[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
                  'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
                  's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
int dx[4] = {-1, 1, 0, 0};
int dy[4] = {0, 0, 1, -1};
int main() {
  int n;
  cin >> n;
  vector<int> lis(n);
  for (int i = (0), i_len = (n); i < i_len; ++i) {
    scanf("%lld", &lis[i]);
  }
  int setwise = lis[0];
  for (int i = (1), i_len = (n); i < i_len; ++i) {
    setwise = gcd(setwise, lis[i]);
  }
  vector<int> flag(1e7, 0);
  int f = 1;
  for (int i = (0), i_len = (n); i < i_len; ++i) {
    if (f == 0) {
      break;
    }
    int dd = 2;
    int cp = lis[i];
    while (dd * dd <= cp + 1) {
      if (cp % dd == 0) {
        cp /= dd;
        if (flag[dd] != 0) {
          f = 0;
          break;
        }
        flag[dd] = 1;
      } else {
        dd++;
      }
    }
    if (flag[dd] != 0) {
      f = 0;
      break;
    }
    flag[dd] = 1;
  }
  if (f == 1) {
    cout << "pairwise coprime" << endl;
  } else if (setwise == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
