#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a % b == 0) {
    return b;
  } else {
    return gcd(b, a % b);
  }
}
long long powc(long long a, long long b) {
  if (b < 0) {
    return -1;
  }
  long long res = 1;
  while (b > 0) {
    if (b & 1) {
      res *= a;
    }
    a *= a;
    b >>= 1;
  }
  return res;
}
vector<vector<long long> > graph(2e5 + 10);
vector<long long> visited(2e5 + 10, 0);
long long cnt = 0;
void dfs(long long in) {
  cnt++;
  visited[in] = 1;
  for (long long i = 0; i < (long long)graph[in].size(); ++i) {
    if (!visited[graph[in][i]]) {
      dfs(graph[in][i]);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  vector<long long> sieve(1e6 + 10, 1);
  for (long long i = 2; i * i < 1e6 + 10; ++i) {
    if (sieve[i] == 1) {
      sieve[i] = i;
      for (long long j = i * i; j < 1e6 + 10; j += i) {
        sieve[j] = i;
      }
    }
  }
  long long n;
  cin >> n;
  vector<long long> v(n);
  for (long long i = 0; i < n; ++i) {
    cin >> v[i];
  }
  map<long long, long long> mp;
  for (long long i = 0; i < n; ++i) {
    long long temp = v[i];
    long long prev = -1;
    while (sieve[temp] != 1) {
      if (sieve[temp] == prev) {
        temp /= sieve[temp];
      } else {
        mp[sieve[temp]]++;
        prev = sieve[temp];
        temp /= sieve[temp];
      }
    }
  }
  bool pr = 1, st = 1;
  for (auto x : mp) {
    if (x.second > 1) {
      pr = 0;
    }
    if (x.second == n) {
      st = 0;
    }
  }
  if (pr) {
    cout << "pairwise coprime";
    return 0;
  }
  if (st) {
    cout << "setwise coprime";
    return 0;
  }
  cout << "not coprime";
}
