#include <bits/stdc++.h>
using namespace std;
const int MAXN = 10e6 + 5;
int n, arr[MAXN];
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
bool pairwise() {
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if (gcd(min(arr[i], arr[j]), max(arr[i], arr[j])) != 1) return false;
    }
  }
  return true;
}
bool setwise() {
  int res = arr[0];
  for (int i = 1; i < n; i++) {
    res = gcd(min(res, arr[i]), max(res, arr[i]));
  }
  if (res == 1) return true;
  return false;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i];
  if (pairwise())
    cout << "pairwise coprime\n";
  else if (setwise())
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
  return 0;
}
