#include <bits/stdc++.h>
using namespace std;
template <class A, class B>
inline bool chmax(A &a, const B &b) {
  return b > a && (a = b, true);
}
template <class A, class B>
inline bool chmin(A &a, const B &b) {
  return b < a && (a = b, true);
}
const int INF = 1 << 30;
const int dx[] = {1, 0, -1, 0, 1, 1, -1, -1};
const int dy[] = {0, -1, 0, 1, 1, -1, -1, 1};
int gcd(int a, int b) {
  if (a % b == 0) {
    return b;
  } else {
    return gcd(b, a % b);
  }
}
vector<int> sosuu;
void Eratosthenes() {
  int N = 100005;
  vector<int> arr(N);
  for (int i = 0; i < N; i++) {
    arr[i] = 1;
  }
  for (int i = 2; i < sqrt(N); i++) {
    if (arr[i]) {
      for (int j = 0; i * (j + 2) < N; j++) {
        arr[i * (j + 2)] = 0;
      }
    }
  }
  for (int i = 2; i < N; i++) {
    if (arr[i]) {
      sosuu.push_back(i);
    }
  }
}
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int n, fg;
  cin >> n;
  vector<int> a(n);
  Eratosthenes();
  vector<int> count(2000005, 0);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (i != 0) {
      fg = gcd(fg, a[i]);
    } else {
      fg = a[i];
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < (int)sosuu.size(); j++) {
      if (a[i] % sosuu[j] == 0) {
        count[sosuu[j]]++;
        if (count[sosuu[j]] == 2) {
          if (fg == 1) {
            cout << "setwise coprime\n";
          } else {
            cout << "not coprime\n";
          }
          return (0);
        }
      }
      if (a[i] <= sosuu[j]) {
        break;
      }
    }
  }
  bool flg = true;
  for (int i = 0; i < (int)count.size(); i++) {
    if (count[i] >= 2) {
      flg = false;
    }
  }
  if (flg) {
    cout << "pairwise coprime\n";
  } else {
    if (fg == 1) {
      cout << "setwise coprime\n";
    } else {
      cout << "not coprime\n";
    }
  }
  return (0);
}
