	.file	"827249.c"
	.intel_syntax noprefix
	.text
	.globl	merging
	.type	merging, @function
merging:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	r11, -798720[rsp]
.LPSRL0:
	sub	rsp, 4096
	or	DWORD PTR [rsp], 0
	cmp	rsp, r11
	jne	.LPSRL0
	sub	rsp, 1392
	mov	QWORD PTR -800088[rbp], rdi
	mov	QWORD PTR -800096[rbp], rsi
	mov	QWORD PTR -800104[rbp], rdx
	mov	QWORD PTR -800112[rbp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -800096[rbp]
	mov	QWORD PTR -800072[rbp], rax
	mov	rax, QWORD PTR -800096[rbp]
	mov	QWORD PTR -800056[rbp], rax
	mov	rax, QWORD PTR -800104[rbp]
	add	rax, 1
	mov	QWORD PTR -800064[rbp], rax
	jmp	.L2
.L6:
	mov	rax, QWORD PTR -800072[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -800088[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -800064[rbp]
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -800088[rbp]
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	cmp	rdx, rax
	jg	.L3
	mov	rax, QWORD PTR -800072[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -800072[rbp], rdx
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -800088[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -800056[rbp]
	mov	QWORD PTR -800048[rbp+rax*8], rdx
	jmp	.L4
.L3:
	mov	rax, QWORD PTR -800064[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -800064[rbp], rdx
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -800088[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -800056[rbp]
	mov	QWORD PTR -800048[rbp+rax*8], rdx
.L4:
	add	QWORD PTR -800056[rbp], 1
.L2:
	mov	rax, QWORD PTR -800072[rbp]
	cmp	rax, QWORD PTR -800104[rbp]
	jg	.L7
	mov	rax, QWORD PTR -800064[rbp]
	cmp	rax, QWORD PTR -800112[rbp]
	jle	.L6
	jmp	.L7
.L8:
	mov	rax, QWORD PTR -800072[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -800072[rbp], rdx
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -800088[rbp]
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -800056[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -800056[rbp], rdx
	mov	rdx, QWORD PTR [rcx]
	mov	QWORD PTR -800048[rbp+rax*8], rdx
.L7:
	mov	rax, QWORD PTR -800072[rbp]
	cmp	rax, QWORD PTR -800104[rbp]
	jle	.L8
	jmp	.L9
.L10:
	mov	rax, QWORD PTR -800064[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -800064[rbp], rdx
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -800088[rbp]
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -800056[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -800056[rbp], rdx
	mov	rdx, QWORD PTR [rcx]
	mov	QWORD PTR -800048[rbp+rax*8], rdx
.L9:
	mov	rax, QWORD PTR -800064[rbp]
	cmp	rax, QWORD PTR -800112[rbp]
	jle	.L10
	mov	rax, QWORD PTR -800096[rbp]
	mov	QWORD PTR -800056[rbp], rax
	jmp	.L11
.L12:
	mov	rax, QWORD PTR -800056[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -800088[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -800056[rbp]
	mov	rax, QWORD PTR -800048[rbp+rax*8]
	mov	QWORD PTR [rdx], rax
	add	QWORD PTR -800056[rbp], 1
.L11:
	mov	rax, QWORD PTR -800056[rbp]
	cmp	rax, QWORD PTR -800112[rbp]
	jle	.L12
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	merging, .-merging
	.globl	sort
	.type	sort, @function
sort:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR -32[rbp]
	cmp	rax, QWORD PTR -40[rbp]
	jge	.L16
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rdx, rax
	shr	rdx, 63
	add	rax, rdx
	sar	rax
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -8[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	sort
	mov	rax, QWORD PTR -8[rbp]
	lea	rcx, 1[rax]
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	sort
	mov	rcx, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	merging
.L16:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	sort, .-sort
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"NO"
.LC2:
	.string	"YES"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	r11, -1597440[rsp]
.LPSRL1:
	sub	rsp, 4096
	or	DWORD PTR [rsp], 0
	cmp	rsp, r11
	jne	.LPSRL1
	sub	rsp, 2704
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -1600136[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	scanf@PLT
	jmp	.L18
.L27:
	movabs	rax, 1000000000000
	mov	QWORD PTR -1600112[rbp], rax
	lea	rax, -1600128[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	scanf@PLT
	mov	QWORD PTR -1600120[rbp], 0
	jmp	.L19
.L21:
	lea	rdx, -1600096[rbp]
	mov	rax, QWORD PTR -1600120[rbp]
	sal	rax, 3
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	scanf@PLT
	mov	rax, QWORD PTR -1600120[rbp]
	mov	rdx, QWORD PTR -1600096[rbp+rax*8]
	mov	rax, QWORD PTR -1600120[rbp]
	mov	QWORD PTR -800048[rbp+rax*8], rdx
	mov	rax, QWORD PTR -1600120[rbp]
	mov	rax, QWORD PTR -1600096[rbp+rax*8]
	cmp	QWORD PTR -1600112[rbp], rax
	jle	.L20
	mov	rax, QWORD PTR -1600120[rbp]
	mov	rax, QWORD PTR -1600096[rbp+rax*8]
	mov	QWORD PTR -1600112[rbp], rax
.L20:
	add	QWORD PTR -1600120[rbp], 1
.L19:
	mov	rax, QWORD PTR -1600128[rbp]
	cmp	QWORD PTR -1600120[rbp], rax
	jl	.L21
	mov	rax, QWORD PTR -1600128[rbp]
	lea	rdx, -1[rax]
	lea	rax, -1600096[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	sort
	mov	QWORD PTR -1600104[rbp], 0
	mov	QWORD PTR -1600120[rbp], 0
	jmp	.L22
.L25:
	mov	rax, QWORD PTR -1600120[rbp]
	mov	rdx, QWORD PTR -800048[rbp+rax*8]
	mov	rax, QWORD PTR -1600120[rbp]
	mov	rax, QWORD PTR -1600096[rbp+rax*8]
	cmp	rdx, rax
	je	.L23
	mov	rax, QWORD PTR -1600120[rbp]
	mov	rax, QWORD PTR -800048[rbp+rax*8]
	cqo
	idiv	QWORD PTR -1600112[rbp]
	mov	rax, rdx
	test	rax, rax
	je	.L23
	mov	QWORD PTR -1600104[rbp], 1
	jmp	.L24
.L23:
	add	QWORD PTR -1600120[rbp], 1
.L22:
	mov	rax, QWORD PTR -1600128[rbp]
	cmp	QWORD PTR -1600120[rbp], rax
	jl	.L25
.L24:
	cmp	QWORD PTR -1600104[rbp], 1
	jne	.L26
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L18
.L26:
	lea	rdi, .LC2[rip]
	call	puts@PLT
.L18:
	mov	rax, QWORD PTR -1600136[rbp]
	lea	rdx, -1[rax]
	mov	QWORD PTR -1600136[rbp], rdx
	test	rax, rax
	jne	.L27
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"827249.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	merging
	.syntax unified
	.arm
	.fpu softvfp
	.type	merging, %function
merging:
	@ args = 16, pretend = 0, frame = 800136
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #798720
	sub	sp, sp, #1408
	sub	sp, sp, #8
	sub	r1, fp, #798720
	sub	r1, r1, #28
	str	r0, [r1, #-1356]
	sub	r1, fp, #798720
	sub	r1, r1, #28
	sub	r1, r1, #1360
	stmdb	r1, {r2-r3}
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1344
	mov	r1, r3
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1360
	ldmdb	r3, {r2-r3}
	stmdb	r1, {r2-r3}
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1328
	mov	r1, r3
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1360
	ldmdb	r3, {r2-r3}
	stmdb	r1, {r2-r3}
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1344
	mov	r1, r3
	ldmib	fp, {r2-r3}
	adds	r4, r2, #1
	adc	r5, r3, #0
	stm	r1, {r4-r5}
	b	.L2
.L6:
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1344
	ldr	r3, [r3, #-8]
	lsl	r2, r3, #3
	sub	r3, fp, #798720
	sub	r3, r3, #28
	ldr	r3, [r3, #-1356]
	add	r3, r3, r2
	ldmia	r3, {r0-r1}
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1344
	ldr	r3, [r3]
	lsl	r2, r3, #3
	sub	r3, fp, #798720
	sub	r3, r3, #28
	ldr	r3, [r3, #-1356]
	add	r3, r3, r2
	ldmia	r3, {r2-r3}
	cmp	r2, r0
	sbcs	r3, r3, r1
	blt	.L3
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1344
	ldmdb	r3, {r2-r3}
	sub	r1, fp, #798720
	sub	r1, r1, #28
	sub	r1, r1, #1344
	adds	r0, r2, #1
	ldr	ip, .L14+4
	add	ip, fp, ip
	str	r0, [ip]
	adc	r0, r3, #0
	ldr	ip, .L14+8
	add	ip, fp, ip
	str	r0, [ip]
	ldr	r0, .L14+4
	add	r0, fp, r0
	ldmia	r0, {r4-r5}
	stmdb	r1, {r4-r5}
	mov	r3, r2
	lsl	r2, r3, #3
	sub	r3, fp, #798720
	sub	r3, r3, #28
	ldr	r3, [r3, #-1356]
	add	r3, r3, r2
	ldmia	r3, {r0-r1}
	sub	r3, fp, #798720
	sub	r3, r3, #28
	mov	r2, r3
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1328
	ldr	r3, [r3, #-8]
	lsl	r3, r3, #3
	add	r3, r2, r3
	sub	r3, r3, #1328
	stm	r3, {r0-r1}
	b	.L4
.L3:
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1344
	ldmia	r3, {r2-r3}
	sub	r1, fp, #798720
	sub	r1, r1, #28
	sub	r1, r1, #1344
	adds	r0, r2, #1
	ldr	ip, .L14+12
	add	ip, fp, ip
	str	r0, [ip]
	adc	r0, r3, #0
	sub	ip, fp, #798720
	sub	ip, ip, #1408
	str	r0, [ip]
	ldr	r0, .L14+12
	add	r0, fp, r0
	ldmia	r0, {r4-r5}
	stm	r1, {r4-r5}
	mov	r3, r2
	lsl	r2, r3, #3
	sub	r3, fp, #798720
	sub	r3, r3, #28
	ldr	r3, [r3, #-1356]
	add	r3, r3, r2
	ldmia	r3, {r0-r1}
	sub	r3, fp, #798720
	sub	r3, r3, #28
	mov	r2, r3
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1328
	ldr	r3, [r3, #-8]
	lsl	r3, r3, #3
	add	r3, r2, r3
	sub	r3, r3, #1328
	stm	r3, {r0-r1}
.L4:
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1328
	mov	r1, r3
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1328
	ldmdb	r3, {r2-r3}
	adds	r6, r2, #1
	adc	r7, r3, #0
	stmdb	r1, {r6-r7}
.L2:
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1344
	ldmdb	r3, {r0-r1}
	ldmib	fp, {r2-r3}
	cmp	r2, r0
	sbcs	r3, r3, r1
	blt	.L7
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1344
	ldmia	r3, {r0-r1}
	add	r3, fp, #12
	ldmia	r3, {r2-r3}
	cmp	r2, r0
	sbcs	r3, r3, r1
	bge	.L6
	b	.L7
.L8:
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1344
	ldmdb	r3, {r2-r3}
	sub	r1, fp, #798720
	sub	r1, r1, #28
	sub	r1, r1, #1344
	adds	r0, r2, #1
	ldr	ip, .L14+16
	add	ip, fp, ip
	str	r0, [ip]
	adc	r0, r3, #0
	ldr	ip, .L14+20
	add	ip, fp, ip
	str	r0, [ip]
	ldr	r0, .L14+16
	add	r0, fp, r0
	ldmia	r0, {r4-r5}
	stmdb	r1, {r4-r5}
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r2, fp, #798720
	sub	r2, r2, #28
	ldr	r2, [r2, #-1356]
	add	r2, r2, r3
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1328
	ldmdb	r3, {r0-r1}
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1328
	adds	ip, r0, #1
	ldr	lr, .L14+24
	add	lr, fp, lr
	str	ip, [lr]
	adc	ip, r1, #0
	sub	lr, fp, #798720
	sub	lr, lr, #1424
	str	ip, [lr]
	ldr	ip, .L14+24
	add	ip, fp, ip
	ldmia	ip, {r4-r5}
	stmdb	r3, {r4-r5}
	ldmia	r2, {r4-r5}
	sub	r3, fp, #798720
	sub	r3, r3, #28
	mov	r2, r3
	mov	r3, r0
	lsl	r3, r3, #3
	add	r3, r2, r3
	sub	r3, r3, #1328
	stm	r3, {r4-r5}
.L7:
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1344
	ldmdb	r3, {r2-r3}
	ldmib	fp, {r0-r1}
	cmp	r0, r2
	sbcs	r3, r1, r3
	bge	.L8
	b	.L9
.L10:
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1344
	ldmia	r3, {r2-r3}
	sub	r1, fp, #798720
	sub	r1, r1, #28
	sub	r1, r1, #1344
	adds	r0, r2, #1
	ldr	ip, .L14+28
	add	ip, fp, ip
	str	r0, [ip]
	adc	r0, r3, #0
	ldr	ip, .L14+32
	add	ip, fp, ip
	str	r0, [ip]
	ldr	r0, .L14+28
	add	r0, fp, r0
	ldmia	r0, {r4-r5}
	stm	r1, {r4-r5}
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r2, fp, #798720
	sub	r2, r2, #28
	ldr	r2, [r2, #-1356]
	add	r0, r2, r3
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1328
	ldmdb	r3, {r2-r3}
	sub	r1, fp, #798720
	sub	r1, r1, #28
	sub	r1, r1, #1328
	adds	ip, r2, #1
	ldr	lr, .L14+36
	add	lr, fp, lr
	str	ip, [lr]
	adc	ip, r3, #0
	sub	lr, fp, #798720
	sub	lr, lr, #1440
	str	ip, [lr]
	ldr	ip, .L14+36
	add	ip, fp, ip
	ldmia	ip, {r4-r5}
	stmdb	r1, {r4-r5}
	ldmia	r0, {r0-r1}
	sub	ip, fp, #798720
	sub	ip, ip, #28
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, ip, r3
	sub	r3, r3, #1328
	stm	r3, {r0-r1}
.L9:
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1344
	ldmia	r3, {r2-r3}
	add	r1, fp, #12
	ldmia	r1, {r0-r1}
	cmp	r0, r2
	sbcs	r3, r1, r3
	bge	.L10
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1328
	mov	r1, r3
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1360
	ldmdb	r3, {r2-r3}
	stmdb	r1, {r2-r3}
	b	.L11
.L12:
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1328
	ldr	r3, [r3, #-8]
	lsl	r3, r3, #3
	sub	r2, fp, #798720
	sub	r2, r2, #28
	ldr	r2, [r2, #-1356]
	add	r1, r2, r3
	sub	r3, fp, #798720
	sub	r3, r3, #28
	mov	r2, r3
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1328
	ldr	r3, [r3, #-8]
	lsl	r3, r3, #3
	add	r3, r2, r3
	sub	r3, r3, #1328
	ldmia	r3, {r2-r3}
	stm	r1, {r2-r3}
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1328
	mov	r1, r3
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1328
	ldmdb	r3, {r2-r3}
	adds	r8, r2, #1
	adc	r9, r3, #0
	stmdb	r1, {r8-r9}
.L11:
	sub	r3, fp, #798720
	sub	r3, r3, #28
	sub	r3, r3, #1328
	ldmdb	r3, {r2-r3}
	add	r1, fp, #12
	ldmia	r1, {r0-r1}
	cmp	r0, r2
	sbcs	r3, r1, r3
	bge	.L12
	nop
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC0
	.word	-800124
	.word	-800120
	.word	-800132
	.word	-800140
	.word	-800136
	.word	-800148
	.word	-800156
	.word	-800152
	.word	-800164
	.size	merging, .-merging
	.align	2
	.global	sort
	.syntax unified
	.arm
	.fpu softvfp
	.type	sort, %function
sort:
	@ args = 8, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	str	r2, [fp, #-52]
	str	r3, [fp, #-48]
	sub	r1, fp, #52
	ldmia	r1, {r0-r1}
	ldmib	fp, {r2-r3}
	cmp	r0, r2
	sbcs	r3, r1, r3
	bge	.L18
	sub	r1, fp, #52
	ldmia	r1, {r0-r1}
	ldmib	fp, {r2-r3}
	adds	r6, r0, r2
	adc	r7, r1, r3
	lsr	r3, r7, #31
	mov	r2, r3
	mov	r3, #0
	adds	r4, r2, r6
	adc	r5, r3, r7
	mov	r2, #0
	mov	r3, #0
	lsr	r2, r4, #1
	orr	r2, r2, r5, lsl #31
	asr	r3, r5, #1
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	stm	sp, {r2-r3}
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	ldr	r0, [fp, #-40]
	bl	sort
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	adds	r8, r2, #1
	adc	r9, r3, #0
	ldmib	fp, {r2-r3}
	stm	sp, {r2-r3}
	mov	r2, r8
	mov	r3, r9
	ldr	r0, [fp, #-40]
	bl	sort
	ldmib	fp, {r2-r3}
	str	r2, [sp, #8]
	str	r3, [sp, #12]
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	stm	sp, {r2-r3}
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	ldr	r0, [fp, #-40]
	bl	merging
.L18:
	nop
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
	.size	sort, .-sort
	.section	.rodata
	.align	2
.LC1:
	.ascii	"%lld\000"
	.global	__aeabi_ldivmod
	.align	2
.LC2:
	.ascii	"NO\000"
	.align	2
.LC3:
	.ascii	"YES\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1600136
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #1589248
	sub	sp, sp, #10880
	sub	sp, sp, #16
	ldr	r3, .L32+44
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	sub	r3, fp, #1589248
	sub	r3, r3, #28
	sub	r3, r3, #10880
	mov	r1, r3
	ldr	r0, .L32+8
	bl	scanf
	b	.L20
.L29:
	ldr	r3, .L32+32
	sub	r2, fp, #28
	add	r3, r2, r3
	mov	r1, r3
	adr	r3, .L32
	ldmia	r3, {r2-r3}
	stmdb	r1, {r2-r3}
	ldr	r3, .L32+12
	sub	r2, fp, #28
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L32+8
	bl	scanf
	ldr	r3, .L32+28
	sub	r2, fp, #28
	add	r3, r2, r3
	mov	r1, r3
	mov	r2, #0
	mov	r3, #0
	stm	r1, {r2-r3}
	b	.L21
.L23:
	ldr	r3, .L32+16
	sub	r2, fp, #28
	add	r3, r2, r3
	ldr	r2, .L32+28
	sub	r1, fp, #28
	add	r2, r1, r2
	ldr	r2, [r2]
	lsl	r2, r2, #3
	add	r3, r3, r2
	mov	r1, r3
	ldr	r0, .L32+8
	bl	scanf
	sub	r3, fp, #1589248
	sub	r3, r3, #28
	sub	r3, r3, #8192
	mov	r2, r3
	ldr	r3, .L32+28
	sub	r1, fp, #28
	add	r3, r1, r3
	ldr	r3, [r3]
	lsl	r3, r3, #3
	add	r3, r2, r3
	sub	r3, r3, #2640
	sub	r3, r3, #8
	ldmia	r3, {r2-r3}
	sub	r1, fp, #798720
	sub	r1, r1, #28
	mov	r0, r1
	ldr	r1, .L32+28
	sub	ip, fp, #28
	add	r1, ip, r1
	ldr	r1, [r1]
	lsl	r1, r1, #3
	add	r1, r0, r1
	sub	r1, r1, #1328
	stm	r1, {r2-r3}
	sub	r3, fp, #1589248
	sub	r3, r3, #28
	sub	r3, r3, #8192
	mov	r2, r3
	ldr	r3, .L32+28
	sub	r1, fp, #28
	add	r3, r1, r3
	ldr	r3, [r3]
	lsl	r3, r3, #3
	add	r3, r2, r3
	sub	r3, r3, #2640
	sub	r3, r3, #8
	ldmia	r3, {r0-r1}
	ldr	r3, .L32+32
	sub	r2, fp, #28
	add	r3, r2, r3
	ldmdb	r3, {r2-r3}
	cmp	r0, r2
	sbcs	r3, r1, r3
	bge	.L22
	ldr	r3, .L32+32
	sub	r2, fp, #28
	add	r3, r2, r3
	mov	r1, r3
	sub	r3, fp, #1589248
	sub	r3, r3, #28
	sub	r3, r3, #8192
	mov	r2, r3
	ldr	r3, .L32+28
	sub	r0, fp, #28
	add	r3, r0, r3
	ldr	r3, [r3]
	lsl	r3, r3, #3
	add	r3, r2, r3
	sub	r3, r3, #2640
	sub	r3, r3, #8
	ldmia	r3, {r2-r3}
	stmdb	r1, {r2-r3}
.L22:
	ldr	r3, .L32+28
	sub	r2, fp, #28
	add	r3, r2, r3
	mov	r1, r3
	ldr	r3, .L32+28
	sub	r2, fp, #28
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	adds	r8, r2, #1
	adc	r9, r3, #0
	stm	r1, {r8-r9}
.L21:
	ldr	r3, .L32+28
	sub	r2, fp, #28
	add	r3, r2, r3
	ldmdb	r3, {r2-r3}
	ldr	r1, .L32+28
	sub	r0, fp, #28
	add	r1, r0, r1
	ldmia	r1, {r0-r1}
	cmp	r0, r2
	sbcs	r3, r1, r3
	blt	.L23
	ldr	r3, .L32+28
	sub	r2, fp, #28
	add	r3, r2, r3
	ldmdb	r3, {r2-r3}
	subs	r6, r2, #1
	sbc	r7, r3, #0
	ldr	r1, .L32+16
	sub	r3, fp, #28
	add	r1, r3, r1
	stm	sp, {r6-r7}
	mov	r2, #0
	mov	r3, #0
	mov	r0, r1
	bl	sort
	ldr	r3, .L32+32
	sub	r2, fp, #28
	add	r3, r2, r3
	mov	r1, r3
	mov	r2, #0
	mov	r3, #0
	stm	r1, {r2-r3}
	ldr	r3, .L32+28
	sub	r2, fp, #28
	add	r3, r2, r3
	mov	r1, r3
	mov	r2, #0
	mov	r3, #0
	stm	r1, {r2-r3}
	b	.L24
.L27:
	sub	r3, fp, #798720
	sub	r3, r3, #28
	mov	r2, r3
	ldr	r3, .L32+28
	sub	r1, fp, #28
	add	r3, r1, r3
	ldr	r3, [r3]
	lsl	r3, r3, #3
	add	r3, r2, r3
	sub	r3, r3, #1328
	ldmia	r3, {r0-r1}
	sub	r3, fp, #1589248
	sub	r3, r3, #28
	sub	r3, r3, #8192
	mov	r2, r3
	ldr	r3, .L32+28
	sub	ip, fp, #28
	add	r3, ip, r3
	ldr	r3, [r3]
	lsl	r3, r3, #3
	add	r3, r2, r3
	sub	r3, r3, #2640
	sub	r3, r3, #8
	ldmia	r3, {r2-r3}
	cmp	r1, r3
	cmpeq	r0, r2
	beq	.L25
	sub	r3, fp, #798720
	sub	r3, r3, #28
	mov	r2, r3
	ldr	r3, .L32+28
	sub	r1, fp, #28
	add	r3, r1, r3
	ldr	r3, [r3]
	lsl	r3, r3, #3
	add	r3, r2, r3
	sub	r3, r3, #1328
	ldmia	r3, {r0-r1}
	ldr	r3, .L32+32
	sub	r2, fp, #28
	add	r3, r2, r3
	ldmdb	r3, {r2-r3}
	bl	__aeabi_ldivmod
	orrs	r3, r2, r3
	beq	.L25
	ldr	r3, .L32+32
	sub	r2, fp, #28
	add	r3, r2, r3
	mov	r1, r3
	mov	r2, #1
	mov	r3, #0
	stm	r1, {r2-r3}
	b	.L26
.L33:
	.align	3
.L32:
	.word	-727379968
	.word	232
	.word	.LC1
	.word	-1600120
	.word	-1600088
	.word	-1600160
	.word	-1600164
	.word	-1600112
	.word	-1600096
	.word	.LC2
	.word	.LC3
	.word	.LC4
.L25:
	ldr	r3, .L32+28
	sub	r2, fp, #28
	add	r3, r2, r3
	mov	r1, r3
	ldr	r3, .L32+28
	sub	r2, fp, #28
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	adds	r0, r2, #1
	ldr	ip, .L32+24
	add	ip, fp, ip
	str	r0, [ip]
	adc	r3, r3, #0
	ldr	r2, .L32+20
	add	r2, fp, r2
	str	r3, [r2]
	ldr	r3, .L32+24
	add	r3, fp, r3
	ldmia	r3, {r2-r3}
	stm	r1, {r2-r3}
.L24:
	ldr	r3, .L32+28
	sub	r2, fp, #28
	add	r3, r2, r3
	ldmdb	r3, {r2-r3}
	ldr	r1, .L32+28
	sub	r0, fp, #28
	add	r1, r0, r1
	ldmia	r1, {r0-r1}
	cmp	r0, r2
	sbcs	r3, r1, r3
	blt	.L27
.L26:
	ldr	r3, .L32+32
	sub	r2, fp, #28
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	cmp	r3, #0
	cmpeq	r2, #1
	bne	.L28
	ldr	r0, .L32+36
	bl	puts
	b	.L20
.L28:
	ldr	r0, .L32+40
	bl	puts
.L20:
	sub	r3, fp, #1589248
	sub	r3, r3, #28
	sub	r3, r3, #10880
	ldmia	r3, {r2-r3}
	subs	r4, r2, #1
	sbc	r5, r3, #0
	sub	r1, fp, #1589248
	sub	r1, r1, #28
	sub	r1, r1, #10880
	stm	r1, {r4-r5}
	orrs	r3, r2, r3
	bne	.L29
	mov	r3, #0
	ldr	r2, .L32+44
	ldr	r1, [r2]
	ldr	r2, [fp, #-32]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L31
	bl	__stack_chk_fail
.L31:
	mov	r0, r3
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
