#include <bits/stdc++.h>
using namespace std;
vector<int> dp(1000001, 0);
bool solve(int n) {
  bool f = 1;
  if (dp[n]) f = 0;
  dp[n] = 1;
  for (int i = 2; i <= sqrt(n); i++)
    if (n % i == 0) {
      if (dp[n / i] || dp[i]) f = 0;
      dp[n / i]++;
      dp[i]++;
    }
  return f;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int cnt = 0;
  for (int i = 0; i < n; i++)
    if (solve(a[i])) cnt++;
  bool f = 0;
  for (int i : dp)
    if (i == n) f = 1;
  if (cnt >= n)
    cout << "pairwise coprime";
  else if (!f)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
