Result: Accepted
Time: 7ms
Memory: 1092kB
#include <stdio.h>
#include <math.h>
int main(void){
int a1,b1,c1,a2,b2,c2;
scanf("%d %d %d",&a1,&b1,&c1);
scanf("%d %d %d",&a2,&b2,&c2);
if(a1==7&&a2==1){
if(b2<b1)
printf("Y e s\n");
else if(b2>b1)
printf("N o\n");
else{
if(c2<=c1)
printf("Y e s\n");
else
printf("N o\n");
}
}
else{
if(abs(a2-a1)>1)
printf("N o\n");
else if(a2==a1){
if(b2<b1)
printf("N o\n");
else if(b2>b1)
printf("Y e s\n");
else{
if(c2<c1)
printf("N o\n");
else
printf("Y e s\n");
}
}
else{
if(a2<a1)
printf("N o\n");
else{
if(b2<b1)
printf("Y e s\n");
else if(b2>b1)
printf("N o\n");
else{
if(c2<=c1)
printf("Y e s\n");
else
printf("N o\n");
}
}
}
}
return 0;
}