#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  vector<int> prime;
  prime.push_back(2);
  vector<bool> check(1000005, 0);
  check[2] = 1;
  for (int i = 3; i <= 1000000; ++i) {
    if (check[i] == 1)
      continue;
    else {
      prime.push_back(i);
      for (int j = i + i; j <= 1000000; j += i) check[j] = 1;
    }
  }
  int n;
  cin >> n;
  int data[n];
  for (int i = 0; i < n; ++i) cin >> data[i];
  int fl = 1;
  int fl2 = 1;
  vector<int> used(1000001, 0);
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < int(prime.size()) && data[i] != 1; ++j) {
      if (data[i] % prime[j] == 0) {
        if (used[prime[j]] != 0) {
          fl = 0;
        }
        used[prime[j]] += 1;
        if (used[prime[j]] >= n) {
          fl2 = 0;
        }
        while (data[i] % prime[j] == 0) data[i] /= prime[j];
      }
    }
  }
  if (fl)
    cout << "pairwise coprime";
  else if (fl2)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return 0;
}
