Language: C++

#include <stdio.h>
#include <string.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
 
class dice {
  private:
    int f[6];
  public:
    dice(int *a){
      int i;
      rep(i, 6) f[i] = a[i];
    }
    dice(){}
    void set(int *a) {
      int i; 
      rep(i, 6) f[i] = a[i];
    }
    void n(){
      int t;
      t = f[0];
      f[0] = f[1];
      f[1] = f[5];
      f[5] = f[4];
      f[4] = t;
    }
    void s() {
      int t;
      t = f[0];
      f[0] = f[4];
      f[4] = f[5];
      f[5] = f[1];
      f[1] = t;
    }
    void w() {
      int t;
      t = f[0];
      f[0] = f[2];
      f[2] = f[5];
      f[5] = f[3];
      f[3] = t;
    }
    void e() {
      int t;
      t = f[0];
      f[0] = f[3];
      f[3] = f[5];
      f[5] = f[2];
      f[2] = t;
    }
    void r() {
      int t;
      t = f[1];
      f[1] = f[2];
      f[2] = f[4];
      f[4] = f[3];
      f[3] = t;
    }
    void l() {
      int t;
      t = f[1];
      f[1] = f[3];
      f[3] = f[4];
      f[4] = f[2];
      f[2] = t;
    }
    int print(int num) {
      return f[num];
    }
};
 
int main(void) {
  int a[6], n, i, j, k, l;
  scanf("%d", &n);
  dice d[n];
  rep(i, n) {
    rep(j, 6) scanf("%d", &a[j]);
    d[i].set(a);
  }
  /*rep(i, n) {
   rep(k, 6) printf("%d ", d[i].print(k));
   printf("\n");
  }*/
  int s = 0;
  rep(i, n) for(j = i + 1; j < n; ++j) {
    rep(l, 30) {
    if(d[i].print(1) == d[j].print(0)) d[j].s();
    else if(d[i].print(2) == d[j].print(0)) d[j].e();
    else if(d[i].print(3) == d[j].print(0)) d[j].e();
    else if(d[i].print(4) == d[j].print(0)) d[j].n();
    else if(d[i].print(5) == d[j].print(0)) d[j].n(), d[j].n();
    if(d[i].print(3) == d[j].print(1)) d[j].r();
    else if(d[i].print(2) == d[j].print(1)) d[j].l();
    else if(d[i].print(4) == d[j].print(1)) d[j].r(), d[j].r();
    /*printf("%d %d:\n", i, j);
    rep(k, 6) printf("%d %d\n", d[i].print(k), d[j].print(k));*/
    int s = 0;
    rep(k, 6) if(d[i].print(k) != d[j].print(k)) s = 1;
    if(!s) {
     /* printf("%d %d:\n", i, j);
      rep(k, 6) printf("%d %d\n", d[i].print(k), d[j].print(k));*/
      printf("No\n");
      return 0;
    }
    }
  }
  printf("Yes\n");
  return 0;
}


Compiler output:
a.cc:4:1: error: extended character   is not valid in an identifier
    4 |  
      | ^
a.cc:6:1: error: extended character   is not valid in an identifier
    6 |   private:
      | ^
a.cc:6:1: error: extended character   is not valid in an identifier
a.cc:7:1: error: extended character   is not valid in an identifier
    7 |     int f[6];
      | ^
a.cc:7:1: error: extended character   is not valid in an identifier
a.cc:7:1: error: extended character   is not valid in an identifier
a.cc:7:1: error: extended character   is not valid in an identifier
a.cc:8:1: error: extended character   is not valid in an identifier
    8 |   public:
      | ^
a.cc:8:1: error: extended character   is not valid in an identifier
a.cc:9:1: error: extended character   is not valid in an identifier
    9 |     dice(int *a){
      | ^
a.cc:9:1: error: extended character   is not valid in an identifier
a.cc:9:1: error: extended character   is not valid in an identifier
a.cc:9:1: error: extended character   is not valid in an identifier
a.cc:10:1: error: extended character   is not valid in an identifier
   10 |       int i;
      | ^
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc:11:1: error: extended character   is not valid in an identifier
   11 |       rep(i, 6) f[i] = a[i];
      | ^
a.cc:11:1: error: extended character   is not valid in an identifier
a.cc:11:1: error: extended character   is not valid in an identifier
a.cc:11:1: error: extended character   is not valid in an identifier
a.cc:11:1: error: extended character   is not valid in an identifier
a.cc:11:1: error: extended character   is not valid in an identifier
a.cc:12:1: error: extended character   is not valid in an identifier
   12 |     }
      | ^
a.cc:12:1: error: extended character   is not valid in an identifier
a.cc:12:1: error: extended character   is not valid in an identifier
a.cc:12:1: error: extended character   is not valid in an identifier
a.cc:13:1: error: extended character   is not valid in an identifier
   13 |     dice(){}
      | ^
a.cc:13:1: error: extended character   is not valid in an identifier
a.cc:13:1: error: extended character   is not valid in an identifier
a.cc:13:1: error: extended character   is not valid in an identifier
a.cc:14:1: error: extended character   is not valid in an identifier
   14 |     void set(int *a) {
      | ^
a.cc:14:1: error: extended character   is not valid in an identifier
a.cc:14:1: error: extended character   is not valid in an identifier
a.cc:14:1: error: extended character   is not valid in an identifier
a.cc:15:1: error: extended character   is not valid in an identifier
   15 |       int i;
      | ^
a.cc:15:1: error: extended character   is not valid in an identifier
a.cc:15:1: error: extended character   is not valid in an identifier
a.cc:15:1: error: extended character   is not valid in an identifier
a.cc:15:1: error: extended character   is not valid in an identifier
a.cc:15:1: error: extended character   is not valid in an identifier
a.cc:16:1: error: extended character   is not valid in an identifier
   16 |       rep(i, 6) f[i] = a[i];
      | ^
a.cc:16:1: error: extended character   is not valid in an identifier
a.cc:16:1: error: extended character   is not valid in an identifier
a.cc:16:1: error: extended character   is not valid in an identifier
a.cc:16:1: error: extended character   is not valid in an identifier
a.cc:16:1: error: extended character   is not valid in an identifier
a.cc:17:1: error: extended character   is not valid in an identifier
   17 |     }
      | ^
a.cc:17:1: error: extended character   is not valid in an identifier
a.cc:17:1: error: extended character   is not valid in an identifier
a.cc:17:1: error: extended character   is not valid in an identifier
a.cc:18:1: error: extended character   is not valid in an identifier
   18 |     void n(){
      | ^
a.cc:18:1: error: extended character   is not valid in an identifier
a.cc:18:1: error: extended character   is not valid in an identifier
a.cc:18:1: error: extended character   is not valid in an identifier
a.cc:19:1: error: extended character   is not valid in an identifier
   19 |       int t;
      | ^
a.cc:19:1: error: extended character   is not valid in an identifier
a.cc:19:1: error: extended character   is not valid in an identifier
a.cc:19:1: error: extended character   is not valid in an identifier
a.cc:19:1: error: extended character   is not valid in an identifier
a.cc:19:1: error: extended character   is not valid in an identifier
a.cc:20:1: error: extended character   is not valid in an identifier
   20 |       t = f[0];
      | ^
a.cc:20:1: error: extended character   is not valid in an identifier
a.cc:20:1: error: extended character   is not valid in an identifier
a.cc:20:1: error: extended character   is not valid in an identifier
a.cc:20:1: error: extended character   is not valid in an identifier
a.cc:20:1: error: extended character   is not valid in an identifier
a.cc:21:1: error: extended character   is not valid in an identifier
   21 |       f[0] = f[1];
      | ^
a.cc:21:1: error: extended character   is not valid in an identifier
a.cc:21:1: error: extended character   is not valid in an identifier
a.cc:21:1: error: extended character   is not valid in an identifier
a.cc:21:1: error: extended character   is not valid in an identifier
a.cc:21:1: error: extended character   is not valid in an identifier
a.cc:22:1: error: extended character   is not valid in an identifier
   22 |       f[1] = f[5];
      | ^
a.cc:22:1: error: extended character   is not valid in an identifier
a.cc:22:1: error: extended character   is not valid in an identifier
a.cc:22:1: error: extended character   is not valid in an identifier
a.cc:22:1: error: extended character   is not valid in an identifier
a.cc:22:1: error: extended character   is not valid in an identifier
a.cc:23:1: error: extended character   is not valid in an identifier
   23 |       f[5] = f[4];
      | ^
a.cc:23:1: error: extended character   is not valid in an identifier
a.cc:23:1: error: extended character   is not valid in an identifier
a.cc:23:1: error: extended character   is not valid in an identifier
a.cc:23:1: error: extended character   is not valid in an identifier
a.cc:23:1: error: extended character   is not valid in an identifier
a.cc:24:1: error: extended character   is not valid in an identifier
   24 |       f[4] = t;
      | ^
a.cc:24:1: error: extended character   is not valid in an identifier
a.cc:24:1: error: extended character   is not valid in an identifier
a.cc:24:1: error: extended character   is not valid in an identifier
a.cc:24:1: error: extended character   is not valid in an identifier
a.cc:24:1: error: extended character   is not valid in an identifier
a.cc:25:1: error: extended character   is not valid in an identifier
   25 |     }
      | ^
a.cc:25:1: error: extended character   is not valid in an identifier
a.cc:25:1: error: extended character   is not valid in an identifier
a.cc:25:1: error: extended character   is not valid in an identifier
a.cc:26:1: error: extended character   is not valid in an identifier
   26 |     void s() {
      | ^
a.cc:26:1: error: extended character   is not valid in an identifier
a.cc:26:1: error: extended character   is not valid in an identifier
a.cc:26:1: error: extended character   is not valid in an identifier
a.cc:27:1: error: extended character   is not valid in an identifier
   27 |       int t;
      | ^
a.cc:27:1: error: extended character   is not valid in an identifier
a.cc:27:1: error: extended character   is not valid in an identifier
a.cc:27:1: error: extended character   is not valid in an identifier
a.cc:27:1: error: extended character   is not valid in an identifier
a.cc:27:1: error: extended character   is not valid in an identifier
a.cc:28:1: error: extended character   is not valid in an identifier
   28 |       t = f[0];
      | ^
a.cc:28:1: error: extended character   is not valid in an identifier
a.cc:28:1: error: extended character   is not valid in an identifier
a.cc:28:1: error: extended character   is not valid in an identifier
a.cc:28:1: error: extended character   is not valid in an identifier
a.cc:28:1: error: extended character   is not valid in an identifier
a.cc:29:1: error: extended character   is not valid in an identifier
   29 |       f[0] = f[4];
      | ^
a.cc:29:1: error: extended character   is not valid in an identifier
a.cc:29:1: error: extended character   is not valid in an identifier
a.cc:29:1: error: extended character   is not valid in an identifier
a.cc:29:1: error: extended character   is not valid in an identifier
a.cc:29:1: error: extended character   is not valid in an identifier
a.cc:30:1: error: extended character   is not valid in an identifier
   30 |       f[4] = f[5];
      | ^
a.cc:30:1: error: extended character   is not valid in an identifier
a.cc:30:1: error: extended character   is not valid in an identifier
a.cc:30:1: error: extended character   is not valid in an identifier
a.cc:30:1: error: extended character   is not valid in an identifier
a.cc:30:1: error: extended character   is not valid in an identifier
a.cc:31:1: error: extended character   is not valid in an identifier
   31 |       f[5] = f[1];
      | ^
a.cc:31:1: error: extended character   is not valid in an identifier
a.cc:31:1: error: extended character   is not valid in an identifier
a.cc:31:1: error: extended character   is not valid in an identifier
a.cc:31:1: error: extended character   is not valid in an identifier
a.cc:31:1: error: extended character   is not valid in an identifier
a.cc:32:1: error: extended character   is not valid in a