#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int dp[1000001];
  for (int i = 0; i < 1000001; i++) dp[i] = 0;
  for (int i = 0; i < n; i++) {
    int A = a[i];
    for (int j = 1; j < std::sqrt(A) + 2; j++) {
      if (A % j == 0) {
        dp[j] += 1;
        if (j != A / j) {
          dp[A / j] += 1;
        }
      }
    }
  }
  int ans = 1;
  for (int i = 2; i < 1000001; i++) {
    ans = max(ans, dp[i]);
  }
  if (ans == 1) {
    cout << "pairwise coprime" << endl;
  } else if (ans < n) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
