#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
int main() {
  int MAX = 1000;
  vector<int> Prime(MAX + 1, 0);
  for (int i = 2; i <= sqrt(MAX); i++) {
    if (Prime[i] == 0) {
      for (int j = 2; j <= MAX; j++) {
        if (i * j > MAX) break;
        if (Prime[i * j] == 0) Prime[i * j] = -1;
      }
    }
  }
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < (int)N; i++) {
    cin >> A[i];
  }
  vector<int> P;
  for (int i = 2; i <= MAX; i++) {
    if (Prime[i] != -1) P.push_back(i);
  }
  vector<int> count(P.size(), 0);
  for (int i = 0; i < (int)N; i++) {
    int x = A[i];
    for (int j = 0; j < (int)P.size(); j++) {
      if (x < P[j]) break;
      while (x % P[j] == 0) {
        x /= P[j];
        count[j]++;
      }
    }
  }
  int allgcd = A[0];
  bool flag = true;
  for (int i = 0; i < (int)N; i++) {
    allgcd = gcd(allgcd, A[i]);
    int x = A[i];
    for (int j = 0; j < (int)P.size(); j++) {
      if (x < P[j]) break;
      while (true) {
        x /= P[j];
        count[j]--;
      }
      if (count[j] > 0) flag = false;
    }
  }
  if (flag) {
    cout << "pairwise coprime"
         << "\n";
  } else if (allgcd == 1) {
    cout << "setwise coprime"
         << "\n";
  } else {
    cout << "not coprime"
         << "\n";
  }
  return 0;
}
