#include <bits/stdc++.h>
using namespace std;
const int d4i[4] = {-1, 0, 1, 0}, d4j[4] = {0, 1, 0, -1};
const int d8i[8] = {-1, -1, 0, 1, 1, 1, 0, -1},
          d8j[8] = {0, 1, 1, 1, 0, -1, -1, -1};
int gcd(int a, int b) {
  if (a == b) return a;
  if (a < b) {
    return gcd(a, b - a);
  }
  return gcd(a - b, b);
}
int gcd1(int arr[], int n) {
  int res = arr[0];
  for (int i = (1); i < (n); i++) {
    res = gcd(res, arr[i]);
    if (res == 1) {
      return 1;
    }
  }
  return res;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  int a[n];
  for (int i = (0); i < (n); i++) {
    cin >> a[i];
  }
  int i;
  for (int i = (1); i < (n); i++) {
    if (gcd(a[i - 1], a[i]) != 1) {
      break;
    }
  }
  if (i == n) {
    cout << "pairwise coprime";
  } else {
    if (gcd1(a, n) == 1) {
      cout << "setwise coprime";
    } else {
      cout << "not coprime";
    }
  }
  return 0;
}
