#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007LL;
const long long INF = (1LL << 60LL);
class Prime {
  long long _size;
  vector<long long> _min;

 public:
  Prime(long long size) {
    _size = size;
    _min.resize(size);
    for (long long i = 2; i < _size; i++) {
      long long cur = i * 2;
      for (;;) {
        if (cur >= _size) {
          break;
        }
        if (_min[cur] != 0) {
          cur += i;
          continue;
        }
        _min[cur] = i;
      }
    }
  }
  void show() {
    for (long long i = 0; i <= 36; i++) {
      cout << i << ":" << _min[i] << endl;
    }
  }
  vector<long long> v(long long num) {
    vector<long long> result;
    for (;;) {
      long long v = _min[num];
      if (v == 0) {
        result.emplace_back(num);
        break;
      }
      num /= v;
      result.emplace_back(v);
    }
    return result;
  }
  unordered_map<long long, long long> m(long long num) {
    unordered_map<long long, long long> result;
    for (;;) {
      long long v = _min[num];
      if (v == 0) {
        result[num] += 1;
        break;
      }
      num /= v;
      result[v] += 1;
    }
    return result;
  }
};
void calc_cmul(unordered_map<long long, long long> &cmul,
               unordered_map<long long, long long> &primes) {
  for (auto e : primes) {
    long long num = e.first;
    long long count = e.second;
    if (cmul[num] < count) {
      cmul[num] = count;
    }
  }
}
long long gcd(long long a, long long b) {
  if (a % b == 0) {
    return b;
  } else {
    return gcd(b, a % b);
  }
}
long long gcd_arr(vector<long long> &a) {
  long long n = a.size();
  for (long long i = n - 2; i >= 0; i--) {
    a[i] = gcd(a[i], a[i + 1]);
  }
  return a.front();
}
int main() {
  long long N;
  scanf("%lld", &N);
  auto prime = Prime(1100000);
  unordered_map<long long, long long> sum;
  vector<long long> list;
  for (long long i = 0; i < N; i++) {
    long long v;
    scanf("%lld", &v);
    list.emplace_back(v);
    auto m = prime.m(v);
    for (auto ite = m.begin(); ite != end(m); ite++) {
      long long key = (*ite).first;
      sum[key] += 1;
    }
  }
  bool pairwise_coprime = true;
  for (auto ite = sum.begin(); ite != end(sum); ite++) {
    if ((*ite).second >= 2) {
      pairwise_coprime = false;
      break;
    }
  }
  if (pairwise_coprime) {
    cout << ("pairwise coprime") << endl;
    return 0;
  }
  long long my = gcd_arr(list);
  if (my == 1) {
    cout << ("setwise coprime") << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
