Language: C

include<stdio.h>

void spin_w(int x[]){
  int sai1[6],i;

  for(i=0;i<6;i++){
    sai1[i]=x[i];
  }

  sai1[0]=x[2];
  sai1[2]=x[5];
  sai1[3]=x[0];
  sai1[5]=x[3];

  for(i=0;i<6;i++){
    x[i]=sai1[i];
  }

}

void spin_side(int x[]){
int sai1[6],i;

for(i=0;i<6;i++){
  sai1[i]=x[i];
 }

sai1[1]=x[2];
sai1[2]=x[4];
sai1[3]=x[1];
sai1[4]=x[3];

for(i=0;i<6;i++){
  x[i]=sai1[i];
 }
}


void spin_s(int x[]){
  int sai1[6],i;

  for(i=0;i<6;i++){
    sai1[i]=x[i];
  }
  sai1[0]=x[4];
  sai1[1]=x[0];
  sai1[4]=x[5];
  sai1[5]=x[1];

  for(i=0;i<6;i++){
    x[i]=sai1[i];
  }
}

int main(){
  int i,j,sai1[6],sai2[6],count=0;

  for(i=0;i<6;i++){
    scanf("%d",&sai1[i]);
  }
  for(i=0;i<6;i++){
    scanf("%d",&sai2[i]);
  }

  for(i=0;i<6;i++){
    if(sai1[i]==sai2[i]){
      count++;
    }
  }
  if(count!=6){

    for(i=0;i<4;i++){
      if(sai1[0]==sai2[0])break;
      spin_w(sai1);
    }
    if(i==5){
      for(i=0;i<4;i++){
        if(sai1[0]==sai2[0])break;
        spin_s(sai1);
      }
    }

    for(i=0;i<4;i++){
      spin_side(sai1);
      if(sai1[1]==sai2[1])break;
    }
  }

  count=0;


  for(i=0;i<6;i++){
    if(sai1[i]==sai2[i]){
      count++;
    }
    printf("%d ",sai1[i]);
  }

  if(count==6){
    printf("Yes\n");
  }else{
    printf("No\n");
  }
  return 0;

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c: In function 'main':
main.c:59:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   59 |     scanf("%d",&sai1[i]);
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include<stdio.h>
main.c:59:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   59 |     scanf("%d",&sai1[i]);
      |     ^~~~~
main.c:59:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:62:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   62 |     scanf("%d",&sai2[i]);
      |     ^~~~~
main.c:62:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:74:7: error: implicit declaration of function 'spin_w'; did you mean 'spin_s'? [-Wimplicit-function-declaration]
   74 |       spin_w(sai1);
      |       ^~~~~~
      |       spin_s
main.c:96:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   96 |     printf("%d ",sai1[i]);
      |     ^~~~~~
main.c:96:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:96:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:96:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:100:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
  100 |     printf("Yes\n");
      |     ^~~~~~
main.c:100:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:102:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
  102 |     printf("No\n");
      |     ^~~~~~
main.c:102:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:104:3: error: expected declaration or statement at end of input
  104 |   return 0;
      |   ^~~~~~