#include <bits/stdc++.h>
using namespace std;
vector<long long> prime;
void fill_prime(int n) {
  vector<int> is_prime(n + 1, 1);
  for (long long i = 2; i * i <= n; i++) {
    if (is_prime[i]) {
      for (long long j = i * i; j <= n; j += i) {
        is_prime[j] = 0;
      }
    }
  }
  for (int i = 2; i <= n; i++) {
    if (is_prime[i]) prime.push_back(i);
  }
}
int main() {
  int n;
  cin >> n;
  unordered_map<long long, long long> mp;
  long long maxv = 0;
  for (int i = 0; i < n; i++) {
    long long x;
    cin >> x;
    mp[x]++;
    maxv = max(maxv, x);
  }
  fill_prime(100001);
  int maxn = 1e6;
  vector<int> cnt(prime.size());
  for (int i = 0; i < prime.size(); i++) {
    long long c = prime[i];
    while (c <= maxv) {
      cnt[i] += mp[c];
      c += prime[i];
    }
  }
  cout << prime.size() << "\n";
  int maxi = 0;
  for (int i = 0; i < prime.size(); i++) {
    maxi = max(maxi, cnt[i]);
  }
  if (maxi <= 1)
    cout << "pairwise coprime";
  else if (maxi < n)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return 0;
}
