Language: C++

#pragma GCC target ("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;

map<long long, long long> factaring(long long x) {
    map<long long, long long>ans;
    long long now = 2;
    while(now *= now <= x) {
        if (x % now == 0) {
            x /= now;
            ans[now]++;
        }
        else now++;
    }
    if (x != 1) ans[x]++;
    return ans;
}

bool used[1000000];

int main() {
    int n;
    cin >> n;
    vector<int>a(n);
    rep(i, n) cin >> a[i];
    bool pairwise = true;
    rep(i, n) {
        map<ll, ll> res = factaring(a[i]);
        for(auto x : res) {
            if (used[x.first]) {
                pairwise = false;
                goto bou;
            }
            used[x.first] = true;
        }
    }
    bou:;
    if (pairwise) {
        cout << "pairwise coprime" << endl;
        return 0;
    }
    int bout = a[0];
    rep(i, n) {
        if (i == 0) continue;
        bout = gcd(bout, a[i]);
    }
    if (bout == 1) cout << "setwise coprime" << endl;
    else cout << "not coprime" << endl;
    return 0;
}


Compiler output:
a.cc:4:78: error: stray '#' in program
    4 | #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")#include <bits/stdc++.h>
      |                                                                              ^
a.cc:4:79: error: '#pragma GCC target' string is badly formed
    4 | #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")#include <bits/stdc++.h>
      |                                                                               ^~~~~~~
a.cc:4:79: error: '#pragma GCC target' string is badly formed
a.cc:8:11: error: 'pair' does not name a type
    8 | using P = pair<int, int>;
      |           ^~~~
a.cc:10:1: error: 'map' does not name a type
   10 | map<long long, long long> factaring(long long x) {
      | ^~~
a.cc: In function 'int main()':
a.cc:28:5: error: 'cin' was not declared in this scope
   28 |     cin >> n;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #pragma GCC target ("avx")
a.cc:29:5: error: 'vector' was not declared in this scope
   29 |     vector<int>a(n);
      |     ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | #pragma GCC target ("avx")
a.cc:29:12: error: expected primary-expression before 'int'
   29 |     vector<int>a(n);
      |            ^~~
a.cc:30:22: error: 'a' was not declared in this scope
   30 |     rep(i, n) cin >> a[i];
      |                      ^
a.cc:33:9: error: 'map' was not declared in this scope
   33 |         map<ll, ll> res = factaring(a[i]);
      |         ^~~
a.cc:1:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
  +++ |+#include <map>
    1 | #pragma GCC target ("avx")
a.cc:33:15: error: expected primary-expression before ',' token
   33 |         map<ll, ll> res = factaring(a[i]);
      |               ^
a.cc:33:19: error: expected primary-expression before '>' token
   33 |         map<ll, ll> res = factaring(a[i]);
      |                   ^
a.cc:33:21: error: 'res' was not declared in this scope; did you mean 'rep'?
   33 |         map<ll, ll> res = factaring(a[i]);
      |                     ^~~
      |                     rep
a.cc:33:37: error: 'a' was not declared in this scope
   33 |         map<ll, ll> res = factaring(a[i]);
      |                                     ^
a.cc:33:27: error: 'factaring' was not declared in this scope
   33 |         map<ll, ll> res = factaring(a[i]);
      |                           ^~~~~~~~~
a.cc:44:9: error: 'cout' was not declared in this scope
   44 |         cout << "pairwise coprime" << endl;
      |         ^~~~
a.cc:44:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:44:39: error: 'endl' was not declared in this scope
   44 |         cout << "pairwise coprime" << endl;
      |                                       ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #pragma GCC target ("avx")
a.cc:47:16: error: 'a' was not declared in this scope
   47 |     int bout = a[0];
      |                ^
a.cc:50:16: error: 'gcd' was not declared in this scope
   50 |         bout = gcd(bout, a[i]);
      |                ^~~
a.cc:52:20: error: 'cout' was not declared in this scope
   52 |     if (bout == 1) cout << "setwise coprime" << endl;
      |                    ^~~~
a.cc:52:20: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:52:49: error: 'endl' was not declared in this scope
   52 |     if (bout == 1) cout << "setwise coprime" << endl;
      |                                                 ^~~~
a.cc:52:49: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:53:10: error: 'cout' was not declared in this scope
   53 |     else cout << "not coprime" << endl;
      |          ^~~~
a.cc:53:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:53:35: error: 'endl' was not declared in this scope
   53 |     else cout << "not coprime" << endl;
      |                                   ^~~~
a.cc:53:35: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'