#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main(int argc, const char *argv[]) {
  int i, j, n, flag = 1;
  char bu[255];
  scanf("%s", bu);
  for (n = 0; bu[n] != '\0'; n++) {
  }
  n--;
  for (i = 0; i < n / 2; i++) {
    if (bu[i] != bu[n - i]) {
      flag = 0;
      break;
    }
  }
  if (flag) {
    printf("Y\n");
  } else {
    printf("N\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x20(%rbp)
lea    -0x120(%rbp),%rsi
lea    0xeb2(%rip),%rdi
call   1040 <scanf@plt>
movl   $0x0,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
movsbl -0x120(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
je     1182 <main+0x62>
jmp    1174 <main+0x54>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    115a <main+0x3a>
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x124(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x124(%rbp),%eax
cmp    %ecx,%eax
jge    11fa <main+0xda>
movslq -0x14(%rbp),%rax
movsbl -0x120(%rbp,%rax,1),%eax
ff
mov    -0x1c(%rbp),%ecx
sub    -0x14(%rbp),%ecx
movslq %ecx,%rcx
movsbl -0x120(%rbp,%rcx,1),%ecx
ff
cmp    %ecx,%eax
je     11e7 <main+0xc7>
movl   $0x0,-0x20(%rbp)
jmp    11fa <main+0xda>
jmp    11ec <main+0xcc>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1192 <main+0x72>
cmpl   $0x0,-0x20(%rbp)
je     1215 <main+0xf5>
lea    0xdf8(%rip),%rdi
call   1030 <printf@plt>
jmp    1221 <main+0x101>
lea    0xdea(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x100,%rsp
lea    0xed1(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    $0xfffffffe,%eax
nop
add    $0x1,%eax
cmpb   $0x0,(%rbx)
lea    0x1(%rbx),%rbx
jne    1140 <main+0x20>
lea    0x1(%rax),%ecx
lea    0xeaf(%rip),%rdi
cmp    $0x3,%ecx
jb     119a <main+0x7a>
mov    %eax,%edx
shr    $0x1f,%edx
add    %eax,%edx
sar    %edx
cmp    $0x2,%edx
mov    $0x1,%ecx
cmovge %edx,%ecx
cltq
add    %rsp,%rax
xor    %edx,%edx
lea    0xe86(%rip),%rsi
nopl   (%rax)
movzbl (%rsp,%rdx,1),%ebx
cmp    (%rax),%bl
jne    1197 <main+0x77>
add    $0x1,%rdx
add    $0xffffffffffffffff,%rax
cmp    %rdx,%rcx
jne    1180 <main+0x60>
jmp    119a <main+0x7a>
mov    %rsi,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [3 x i8] c"Y\0A\00"
@.str.2 = [3 x i8] c"N\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [255 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %9
%11 = getelementptr inbounds [255 x i8], [255 x i8]* %10, i64 0, i64 0
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %11)
store i32 0, i32* %8
br label %13
13: ; preds = %21, %2
%14 = load i32, i32* %8
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [255 x i8], [255 x i8]* %10, i64 0, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %24
20: ; preds = %13
br label %21
21: ; preds = %20
%22 = load i32, i32* %8
%23 = add nsw i32 %22, 1
store i32 %23, i32* %8
br label %13
24: ; preds = %13
%25 = load i32, i32* %8
%26 = add nsw i32 %25, -1
store i32 %26, i32* %8
store i32 0, i32* %6
br label %27
27: ; preds = %48, %24
%28 = load i32, i32* %6
%29 = load i32, i32* %8
%30 = sdiv i32 %29, 2
%31 = icmp slt i32 %28, %30
br i1 %31, label %32, label %51
32: ; preds = %27
%33 = load i32, i32* %6
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [255 x i8], [255 x i8]* %10, i64 0, i64 %34
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = load i32, i32* %8
%39 = load i32, i32* %6
%40 = sub nsw i32 %38, %39
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [255 x i8], [255 x i8]* %10, i64 0, i64 %41
%43 = load i8, i8* %42
%44 = sext i8 %43 to i32
%45 = icmp ne i32 %37, %44
br i1 %45, label %46, label %47
46: ; preds = %32
store i32 0, i32* %9
br label %51
47: ; preds = %32
br label %48
48: ; preds = %47
%49 = load i32, i32* %6
%50 = add nsw i32 %49, 1
store i32 %50, i32* %6
br label %27
51: ; preds = %46, %27
%52 = load i32, i32* %9
%53 = icmp ne i32 %52, 0
br i1 %53, label %54, label %56
54: ; preds = %51
%55 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %58
56: ; preds = %51
%57 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %58
58: ; preds = %56, %54
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@str = [2 x i8] c"N\00"
@str.3 = [2 x i8] c"Y\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [255 x i8]
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
br label %6
6: ; preds = %6, %2
%7 = phi i64 [ %11, %6 ], [ 0, %2 ]
%8 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
%11 = add nuw i64 %7, 1
br i1 %10, label %12, label %6
12: ; preds = %6
%13 = trunc i64 %7 to i32
%14 = add nsw i32 %13, -1
%15 = icmp ugt i32 %13, 2
br i1 %15, label %16, label %32
16: ; preds = %12
%17 = sdiv i32 %14, 2
%18 = sext i32 %14 to i64
%19 = call i32 @llvm.smax.i32(i32 %17, i32 1)
%20 = zext i32 %19 to i64
br label %23
21: ; preds = %23
%22 = icmp eq i64 %31, %20
br i1 %22, label %32, label %23
23: ; preds = %16, %21
%24 = phi i64 [ 0, %16 ], [ %31, %21 ]
%25 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 %24
%26 = load i8, i8* %25
%27 = sub nsw i64 %18, %24
%28 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 %27
%29 = load i8, i8* %28
%30 = icmp eq i8 %26, %29
%31 = add nuw nsw i64 %24, 1
br i1 %30, label %21, label %32
32: ; preds = %23, %21, %12
%33 = phi i8* [ getelementptr inbounds ([2 x i8], [2 x i8]* @str.3, i64 0, i64 0), %12 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @str.3, i64 0, i64 0), %21 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0), %23 ]
%34 = call i32 @puts(i8* dereferenceable(1) %33)
ret i32 0
}