#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};
vector<long long> prime(int a) {
  vector<long long> p;
  long long now = 1;
  for (int i = 2; i * i <= a; i++) {
    while (a % i == 0) {
      if (now != i) {
        p.push_back(i);
        now = i;
      }
      a /= i;
    }
  }
  if (a != 1) {
    p.push_back(a);
  }
  return p;
}
int gcd(int a, int b) {
  if (a == b)
    return a;
  else if (a < b) {
    return gcd(a, b % a);
  } else {
    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];
  }
  bool ok = false;
  vector<long long> p = prime(a[0]);
  vector<bool> pw(1e6 + 100, false);
  for (auto x : p) {
    pw[x] = true;
  }
  for (int i = (1); i < (n); i++) {
    vector<long long> z = prime(a[i]);
    for (auto x : z) {
      if (pw[x]) {
        break;
      }
      pw[x] = true;
    }
    if (i == n - 1) {
      cout << "pairwise coprime";
      ok = true;
    }
  }
  if (!ok) {
    if (gcd1(a, n) == 1) {
      cout << "setwise coprime";
    } else {
      cout << "not coprime";
    }
  }
  return 0;
}
