Result: Accepted
Time: 6ms
Memory: 1092kB
#include<stdio.h>
int main(){
int a,b,c,x,y,z;
scanf("%d %d %d",&a,&b,&c);
scanf("%d %d %d",&x,&y,&z);
if(a>=1&&a<=6){
if(a==x)
printf("Y e s\n");
else if(x==(a+1)){
if(b<y)
printf("N o\n");
if(b>y)
printf("Y e s\n");
if(b==y){
if(c<z)
printf("N o\n");
else
printf("Y e s\n");
}
}
else
printf("N o\n");
}
if(a==7){
if(a==x)
printf("Y e s\n");
else if(x==1){
if(b<y)
printf("N o\n");
if(b>y)
printf("Y e s\n");
if(b==y){
if(c<z)
printf("N o\n");
else
printf("Y e s\n");
}
}
else
printf("N o\n");
}
return 0;
}