#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);
int /*<<< orphan*/ scanf(char *, int *);
main() {
  int a;
  scanf("%d", &a);
  if (((a / 10000) == (a % 10)) && ((a / 1000) % 10 == ((a % 100) / 10)))
    printf("%d poly\n", a);
  else
    printf("%d no poly\n", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x2710,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0xc(%rbp),%eax
cmp    %edx,%eax
jne    11ad <main+0x8d>
mov    -0x8(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%edx
cmp    %eax,%edx
jne    11ad <main+0x8d>
mov    -0x8(%rbp),%esi
lea    0xe60(%rip),%rdi
call   1030 <printf@plt>
jmp    11bc <main+0x9c>
mov    -0x8(%rbp),%esi
lea    0xe55(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movslq 0x4(%rsp),%rsi
imul   $0x68db8bad,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x2c,%rax
add    %ecx,%eax
imul   $0x66666667,%rsi,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
mov    %esi,%edx
sub    %ecx,%edx
cmp    %edx,%eax
jne    11df <main+0xbf>
movslq %esi,%rcx
imul   $0x10624dd3,%rcx,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rax
add    %edx,%eax
cltq
imul   $0x66666667,%rax,%rdx
mov    %rdx,%rdi
shr    $0x3f,%rdi
sar    $0x22,%rdx
add    %edi,%edx
add    %edx,%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%eax
imul   $0x51eb851f,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
mov    %esi,%edx
sub    %ecx,%edx
movsbl %dl,%ecx
imul   $0x67,%ecx,%ecx
movzwl %cx,%ecx
movswl %cx,%edx
shr    $0xf,%ecx
shr    $0xa,%edx
add    %cl,%dl
movsbl %dl,%ecx
cmp    %ecx,%eax
jne    11df <main+0xbf>
lea    0xe26(%rip),%rdi
jmp    11e6 <main+0xc6>
lea    0xe26(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [9 x i8] c"%d poly\0A\00"
@.str.2 = [12 x i8] c"%d no poly\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = sdiv i32 %4, 10000
%6 = load i32, i32* %2
%7 = srem i32 %6, 10
%8 = icmp eq i32 %5, %7
br i1 %8, label %9, label %20
9: ; preds = %0
%10 = load i32, i32* %2
%11 = sdiv i32 %10, 1000
%12 = srem i32 %11, 10
%13 = load i32, i32* %2
%14 = srem i32 %13, 100
%15 = sdiv i32 %14, 10
%16 = icmp eq i32 %12, %15
br i1 %16, label %17, label %20
17: ; preds = %9
%18 = load i32, i32* %2
%19 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %18)
br label %23
20: ; preds = %9, %0
%21 = load i32, i32* %2
%22 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %21)
br label %23
23: ; preds = %20, %17
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [9 x i8] c"%d poly\0A\00"
@.str.2 = [12 x i8] c"%d no poly\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = sdiv i32 %4, 10000
%6 = srem i32 %4, 10
%7 = icmp eq i32 %5, %6
br i1 %7, label %8, label %16
8: ; preds = %0
%9 = sdiv i32 %4, 1000
%10 = srem i32 %9, 10
%11 = srem i32 %4, 100
%12 = trunc i32 %11 to i8
%13 = sdiv i8 %12, 10
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %10, %14
br i1 %15, label %17, label %16
16: ; preds = %8, %0
br label %17
17: ; preds = %8, %16
%18 = phi i8* [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), %16 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), %8 ]
%19 = call i32 @printf(i8* %18, i32 %4)
ret i32 0
}