#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
const long long INF_L = 1LL << 60;
const int MOD = 1e9 + 7;
void coi(long long i) { cout << i << endl; }
void cois(long long i) { cout << i << " "; }
void cod(long double d) {
  cout << fixed << setprecision(16);
  cout << d << endl;
}
void cods(long double d) {
  cout << fixed << setprecision(16);
  cout << d << " ";
}
void coc(char c) { cout << c << endl; }
void cocs(char c) { cout << c << " "; }
void cos(string s) { cout << s << endl; }
void coss(string s) { cout << s << " "; }
void coynl(bool b) { cos(b ? "Yes" : "No"); }
void coYNU(bool b) { cos(b ? "YES" : "NO"); }
int ctoi(char c) {
  if (isdigit(c))
    return c - '0';
  else if (islower(c))
    return c - 'a';
  else if (isupper(c))
    return c - 'A';
  else
    return -1;
}
char itocd(int i) {
  char c = i + '0';
  if (isdigit(c))
    return c;
  else
    return 0x00;
}
char itocl(int i) {
  char c = i + 'a';
  if (islower(c))
    return c;
  else
    return 0x00;
}
char itocu(int i) {
  char c = i + 'A';
  if (isupper(c))
    return c;
  else
    return 0x00;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
struct edge {
  long long to, cost;
};
struct GraphList {
  long long V;
  vector<vector<edge>> graph;
  vector<long long> dist;
  GraphList(long long N) { init(N); }
  void init(long long N) {
    V = N;
    graph.resize(V);
    dist.resize(V);
    for (int i = 0; i < V; i++) {
      dist[i] = INF_L;
    }
  }
  void add_edge(long long from, long long to, long long cost) {
    edge e;
    e.to = to;
    e.cost = cost;
    graph[from].push_back(e);
  }
  void dijkstra(long long s) {
    for (int i = 0; i < V; i++) {
      dist[i] = INF_L;
    }
    dist[s] = 0;
    priority_queue<pair<long long, long long>,
                   vector<pair<long long, long long>>,
                   greater<pair<long long, long long>>>
        que;
    que.push(pair<long long, long long>(0, s));
    while (!que.empty()) {
      pair<long long, long long> p = que.top();
      que.pop();
      long long v = p.second;
      if (dist[v] < p.first) continue;
      for (auto e : graph[v]) {
        if (dist[e.to] > dist[v] + e.cost) {
          dist[e.to] = dist[v] + e.cost;
          que.push(pair<long long, long long>(dist[e.to], e.to));
        }
      }
    }
  }
  void bellman_ford(long long s) {
    for (int i = 0; i < V; i++) {
      dist[i] = INF_L;
    }
    dist[s] = 0;
  }
};
struct GraphMatrix {
  long long vertex;
  vector<vector<edge>> graph;
  vector<long long> dist;
  GraphMatrix(long long N) { init(N); }
  void init(long long N) {
    vertex = N;
    graph.resize(vertex);
    dist.resize(vertex);
    for (int i = 0; i < vertex; i++) {
      dist[i] = INF;
    }
  }
  void add_edge(long long s, long long t, long long cost) {
    edge e;
    e.to = t;
    e.cost = cost;
    graph[s].push_back(e);
  }
  void warshall_floyd(long long s) {
    for (int i = 0; i < vertex; i++) {
      dist[i] = INF;
    }
    dist[s] = 0;
  }
};
long long gcd(long long A, long long B) {
  if (A % B == 0) {
    return (B);
  } else {
    return (gcd(B, A % B));
  }
}
long long lcm(long long A, long long B) { return A * B / gcd(A, B); }
long long getDigit(long long N) { return (long long)(to_string(N).length()); }
long long getDigitForBase(long long N, long long B) {
  if (B < 2) {
    return -1;
  } else if (B == 10) {
    return getDigit(N);
  } else {
    long long r = 0;
    while (N != 0) {
      N /= B;
      r++;
    }
    return r;
  }
}
long long getDigitSum(long long N) {
  long long r = 0;
  string Ns = to_string(N);
  for (int i = 0; i < getDigit(N); i++) {
    r += ctoi(Ns[i]);
  }
  return r;
}
long long getDivTimes(long long N, long long D) {
  long long r = 0;
  while (N % D == 0) {
    N /= D;
    r++;
  }
  return r;
}
long long powMod(long long B, long long P) {
  if (P == 0) return 1;
  if (P % 2 == 0) {
    long long t = powMod(B, P / 2);
    return t * t % MOD;
  }
  return B * powMod(B, P - 1) % MOD;
}
long long invMod(long long N) { return powMod(N, MOD - 2); }
const long long FPC_INIT_SIZE_MAX = 1e6 + 9;
struct FPCMod {
  long long size;
  vector<long long> inv, fac, finv;
  FPCMod(long long N) { init(N); }
  void init(long long N) {
    size = (N > 1 && N < FPC_INIT_SIZE_MAX) ? N : FPC_INIT_SIZE_MAX;
    inv.resize(size);
    fac.resize(size);
    finv.resize(size);
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < size; i++) {
      fac[i] = fac[i - 1] * i % MOD;
      inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
      finv[i] = finv[i - 1] * inv[i] % MOD;
    }
  }
  long long inverseMod(long long N) { return inv[N] % MOD; }
  long long factrialMod(long long N) { return fac[N] % MOD; }
  long long factrialInverseMod(long long N) { return finv[N] % MOD; }
  long long permutationMod(long long N, long long K) {
    if (N < 0 || K < 0 || N < K)
      return 0;
    else
      return factrialMod(N) * factrialInverseMod(N - K) % MOD;
  }
  long long combinationMod(long long N, long long K) {
    if (N < 0 || K < 0 || N < K)
      return 0;
    else if (N < size) {
      return factrialMod(N) *
             (factrialInverseMod(K) * factrialInverseMod(N - K) % MOD) % MOD;
    } else {
      long long ans = 1;
      long long Ks = K < N - K ? K : N - K;
      for (long long i = N; i > N - Ks; i--) {
        ans *= i;
        ans %= MOD;
      }
      return ans * factrialInverseMod(Ks) % MOD;
    }
  }
};
const long long SIEVE_INIT_SIZE_MAX = 1e9 + 9;
struct SieveEratosthenes {
  long long N_max;
  long long size, size_sqrt;
  vector<bool> sieve;
  bool sieve_fg;
  vector<long long> sievingp;
  bool sievingp_fg;
  vector<long long> primes;
  bool primes_fg;
  vector<int> skipPrimes = {2, 3, 5};
  vector<int> standReminders = {1, 7, 11, 13, 17, 19, 23, 29};
  vector<int> invidxStandReminders = {-1, 0,  -1, -1, -1, -1, -1, 1,  -1, -1,
                                      -1, 2,  -1, 3,  -1, -1, -1, 4,  -1, 5,
                                      -1, -1, -1, 6,  -1, -1, -1, -1, -1, 7};
  const int SP_prod = 2 * 3 * 5;
  int SR_size = 8;
  SieveEratosthenes(long long N, int c) {
    switch (c) {
      case 1:
        sieve_fg = true;
        sievingp_fg = true;
        break;
      default:
        sieve_fg = true;
        sievingp_fg = false;
        break;
    }
    init(N);
  }
  void init(long long N) {
    N_max = (N > 1 && N < SIEVE_INIT_SIZE_MAX) ? N : SIEVE_INIT_SIZE_MAX;
    size = (N_max / SP_prod + 1) * SR_size;
    size_sqrt = ((long long)sqrt(N_max) / SP_prod + 1) * SR_size;
    sieve = vector<bool>(size, true);
    sievingp = vector<long long>(size, 0);
    primes.clear();
    sieveInit();
  }
  void sieveInit() {
    for (int i = 1; i < size_sqrt; i++) {
      if (!sieve[i]) continue;
      int num_i = idxtonum(i);
      coi(num_i);
      for (int j = num_i * num_i; j < N_max; j += num_i) {
        int idx_j = numtoidx(j);
        if (idx_j > 0) {
          sieve[idx_j] = false;
          sievingp[idx_j] = num_i;
        }
      }
    }
  }
  bool isPrime(int N) {
    if (!sieve_fg) return false;
    if (N < 2 || N >= N_max) return false;
    for (auto p : skipPrimes) {
      if (N == p) return true;
      if (N % p == 0) return false;
    }
    return sieve[numtoidx(N)];
  }
  long long getSievingPrime(int N) {
    if (!sievingp_fg) return -1;
    if (N < 2 || N >= N_max) return -1;
    for (auto p : skipPrimes) {
      if (N % p == 0) return p;
    }
    if (isPrime(N)) return N;
    return sievingp[numtoidx(N)];
  }
  int idxtonum(int idx) {
    return (idx / SR_size) * SP_prod + standReminders[idx % SR_size];
  }
  int numtoidx(int num) {
    int iiSR = invidxStandReminders[num % SP_prod];
    return iiSR < 0 ? -1 : (num / SP_prod) * SR_size + iiSR;
  }
};
struct SieveAtkinBernstein {
  long long N_max;
  long long size, size_sqrt;
  vector<bool> sieve;
  SieveAtkinBernstein(long long N) { init(N); }
  void init(long long N) {
    N_max = (N > 1 && N < SIEVE_INIT_SIZE_MAX) ? N : SIEVE_INIT_SIZE_MAX;
    size = N_max;
    size_sqrt = (long long)sqrt(size + 0.1);
    sieve.resize(size);
    sieveInit(N);
  }
  void sieveInit(long long N) {
    sieve[2] = sieve[3] = true;
    int n = 0;
    for (int z = 1; z <= 5; z += 4) {
      for (int y = z; y <= size_sqrt; y += 6) {
        for (int x = 1; x <= size_sqrt && (n = 4 * x * x + y * y) < size; x++)
          sieve[n] = !sieve[n];
        for (int x = y + 1; x <= size_sqrt && (n = 3 * x * x - y * y) < size;
             x += 2)
          sieve[n] = !sieve[n];
      }
    }
    for (int z = 2; z <= 4; z += 2) {
      for (int y = z; y <= size_sqrt; y += 6) {
        for (int x = 1; x <= size_sqrt && (n = 3 * x * x + y * y) < size;
             x += 2)
          sieve[n] = !sieve[n];
        for (int x = y + 1; x <= size_sqrt && (n = 3 * x * x - y * y) < size;
             x += 2)
          sieve[n] = !sieve[n];
      }
    }
    for (int z = 1; z <= 2; z++) {
      for (int y = 3; y <= size_sqrt; y += 6) {
        for (int x = z; x <= size_sqrt && (n = 4 * x * x + y * y) < size;
             x += 3)
          sieve[n] = !sieve[n];
      }
    }
    for (int k = 5; k <= size_sqrt; k++)
      if (sieve[k])
        for (int n = k * k; n < size; n += k * k) sieve[n] = false;
  }
  bool isPrime(long long N) {
    if (N < 0 || N >= N_max) return false;
    return sieve[N];
  }
};
map<long long, map<long long, long long>> primeFactorMap;
map<long long, set<long long>> primeFactorSet;
void primeFactorizeInit() {
  primeFactorMap.clear();
  primeFactorSet.clear();
}
void primeFactorize(long long N) {
  if (N < 0 || N > INF_L) return;
  long long Nc = N, Nsq = sqrt(N + 0.1);
  for (int k = 2; k <= Nsq; k++) {
    long long dt = 0;
    while (Nc % k == 0) {
      dt++;
      Nc /= k;
    }
    if (dt > 0) primeFactorMap[N][k] = dt;
    if (N % k == 0) {
      primeFactorSet[N].insert(k);
      primeFactorSet[N].insert(N / k);
    }
  }
  if (Nc != 1) primeFactorMap[N][Nc] = 1;
  primeFactorSet[N].insert(1);
  primeFactorSet[N].insert(N);
}
void input() {}
void solve() {
  int N;
  cin >> N;
  vector<long long> A(N, 0);
  long long Amax = 0, Agcd = 0;
  vector<long long> C(Amax + 1, 0);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    chmax(Amax, A[i]);
    Agcd = gcd(Agcd, A[i]);
    C[A[i]]++;
  }
  if (Agcd == 1) {
    bool fg = true;
    for (int i = 2; i < Amax + 1; i++) {
      int cnt = 0;
      for (int j = i; j < Amax + 1; j += i) {
        cnt += C[j];
      }
      if (cnt > 1) {
        fg = false;
        break;
      }
    }
    cos(fg ? "pairwise coprime" : "setwise coprime");
  } else {
    cos("not coprime");
  }
}
int main() {
  std::ifstream in("input.txt");
  std::cin.rdbuf(in.rdbuf());
  cin.tie(0);
  ios::sync_with_stdio(false);
  input();
  solve();
  return 0;
}
