global  _start

  section .text

_start:
  xor eax, eax
loop:
  push rax
  mov eax, 3 ; sys_read
  mov ebx, 0 ; fd
  mov ecx, input
  mov edx, 1
  int 0x80
  xor ecx, ecx
  mov cl, [input]
  cmp cl, 0x0a
  pop rax
  je readend
  mov edx, 10
  mul edx
  sub ecx, 0x30 ; '0'
  add eax, ecx
  jmp loop

readend:
  mov esi, eax

  xor edx, edx
  mov eax, esi
  mov ecx, 400
  div ecx
  test edx, edx
  je yes

  mov eax, esi
  xor edx, edx
  mov eax, esi
  mov ecx, 100
  div ecx
  test edx, edx
  je no
  
  mov eax, esi
  xor edx, edx
  mov eax, esi
  mov ecx, 4
  div ecx
  test edx, edx
  je yes

no:
  mov eax, 4 ; sys_write
  mov ebx, 1 ; fd
  mov ecx, notext
  mov edx, 3
  int 0x80

  mov eax, 60
  mov rdi, 0
  syscall
  ret

yes:
  mov eax, 4 ; sys_write
  mov ebx, 1 ; fd
  mov ecx, yestext
  mov edx, 4
  int 0x80

  mov eax, 60
  mov rdi, 0
  syscall
  ret

  section .data
  
input db 0
notext db "No"
       db 0x0a
yestext db "Yes"
       db 0x0a