From 86608c6770cf08c138a2bdab5855072f64be09ef Mon Sep 17 00:00:00 2001 From: joshua Date: Sat, 30 Dec 2023 23:54:31 -0500 Subject: initial commit --- .../nn_test/RTE/Device/ARMCM0/startup_ARMCM0.s | 242 +++++++ .../nn_test/RTE/Device/ARMCM0/system_ARMCM0.c | 56 ++ .../nn_test/RTE/Device/ARMCM3/startup_ARMCM3.s | 262 +++++++ .../nn_test/RTE/Device/ARMCM3/system_ARMCM3.c | 68 ++ .../nn_test/RTE/Device/ARMCM4/startup_ARMCM4.s | 262 +++++++ .../nn_test/RTE/Device/ARMCM4/system_ARMCM4.c | 83 +++ .../nn_test/RTE/Device/ARMCM4_FP/startup_ARMCM4.s | 262 +++++++ .../nn_test/RTE/Device/ARMCM4_FP/system_ARMCM4.c | 83 +++ .../nn_test/RTE/Device/ARMCM7_SP/startup_ARMCM7.c | 295 ++++++++ .../nn_test/RTE/Device/ARMCM7_SP/startup_ARMCM7.s | 262 +++++++ .../nn_test/RTE/Device/ARMCM7_SP/system_ARMCM7.c | 85 +++ .../RTE/Device/STM32F411RETx/startup_stm32f411xe.s | 395 ++++++++++ .../RTE/Device/STM32F411RETx/system_stm32f4xx.c | 763 ++++++++++++++++++++ .../nn_test/RTE/_ARMCM0/RTE_Components.h | 20 + .../nn_test/RTE/_ARMCM3/RTE_Components.h | 26 + .../nn_test/RTE/_ARMCM4_FP/RTE_Components.h | 26 + .../nn_test/RTE/_ARMCM7_SP/RTE_Components.h | 26 + .../Ref_Implementations/arm_convolve_HWC_q15_ref.c | 71 ++ .../arm_convolve_HWC_q15_ref_nonsquare.c | 83 +++ .../Ref_Implementations/arm_convolve_HWC_q7_ref.c | 72 ++ .../arm_convolve_HWC_q7_ref_nonsquare.c | 78 ++ .../arm_depthwise_separable_conv_HWC_q7_ref.c | 70 ++ ...depthwise_separable_conv_HWC_q7_ref_nonsquare.c | 75 ++ .../arm_fully_connected_mat_q7_vec_q15_opt_ref.c | 120 +++ .../arm_fully_connected_mat_q7_vec_q15_ref.c | 43 ++ .../arm_fully_connected_q15_opt_ref.c | 119 +++ .../arm_fully_connected_q15_ref.c | 43 ++ .../arm_fully_connected_q7_opt_ref.c | 138 ++++ .../arm_fully_connected_q7_ref.c | 43 ++ .../nn_test/Ref_Implementations/arm_nn_mult_ref.c | 58 ++ .../nn_test/Ref_Implementations/arm_pool_ref.c | 96 +++ .../nn_test/Ref_Implementations/arm_relu_ref.c | 42 ++ .../fully_connected_testing_weights.h | 7 + .../nn_test/Ref_Implementations/ref_functions.h | 250 +++++++ .../nn_test/arm_nnexamples_nn_test.cpp | 801 +++++++++++++++++++++ .../NN_Lib_Tests/nn_test/arm_nnexamples_nn_test.h | 78 ++ Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/readme.txt | 4 + 37 files changed, 5507 insertions(+) create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM0/startup_ARMCM0.s create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM0/system_ARMCM0.c create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM3/startup_ARMCM3.s create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM3/system_ARMCM3.c create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM4/startup_ARMCM4.s create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM4/system_ARMCM4.c create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM4_FP/startup_ARMCM4.s create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM4_FP/system_ARMCM4.c create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM7_SP/startup_ARMCM7.c create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM7_SP/startup_ARMCM7.s create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM7_SP/system_ARMCM7.c create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/STM32F411RETx/startup_stm32f411xe.s create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/STM32F411RETx/system_stm32f4xx.c create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/_ARMCM0/RTE_Components.h create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/_ARMCM3/RTE_Components.h create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/_ARMCM4_FP/RTE_Components.h create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/_ARMCM7_SP/RTE_Components.h create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_convolve_HWC_q15_ref.c create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_convolve_HWC_q15_ref_nonsquare.c create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_convolve_HWC_q7_ref.c create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_convolve_HWC_q7_ref_nonsquare.c create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_depthwise_separable_conv_HWC_q7_ref.c create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_depthwise_separable_conv_HWC_q7_ref_nonsquare.c create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_mat_q7_vec_q15_opt_ref.c create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_mat_q7_vec_q15_ref.c create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_q15_opt_ref.c create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_q15_ref.c create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_q7_opt_ref.c create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_q7_ref.c create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_nn_mult_ref.c create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_pool_ref.c create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_relu_ref.c create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/fully_connected_testing_weights.h create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/ref_functions.h create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/arm_nnexamples_nn_test.cpp create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/arm_nnexamples_nn_test.h create mode 100644 Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/readme.txt (limited to 'Drivers/CMSIS/NN/NN_Lib_Tests') diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM0/startup_ARMCM0.s b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM0/startup_ARMCM0.s new file mode 100644 index 0000000..b01f02d --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM0/startup_ARMCM0.s @@ -0,0 +1,242 @@ +;/**************************************************************************//** +; * @file startup_ARMCM0.s +; * @brief CMSIS Core Device Startup File for +; * ARMCM0 Device Series +; * @version V5.00 +; * @date 02. March 2016 +; ******************************************************************************/ +;/* +; * Copyright (c) 2009-2016 ARM Limited. All rights reserved. +; * +; * SPDX-License-Identifier: Apache-2.0 +; * +; * Licensed under the Apache License, Version 2.0 (the License); you may +; * not use this file except in compliance with the License. +; * You may obtain a copy of the License at +; * +; * www.apache.org/licenses/LICENSE-2.0 +; * +; * Unless required by applicable law or agreed to in writing, software +; * distributed under the License is distributed on an AS IS BASIS, WITHOUT +; * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +; * See the License for the specific language governing permissions and +; * limitations under the License. +; */ + +;/* +;//-------- <<< Use Configuration Wizard in Context Menu >>> ------------------ +;*/ + + +; Stack Configuration +; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Stack_Size EQU 0x00000400 + + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + + +; Heap Configuration +; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Heap_Size EQU 0x00000C00 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + + PRESERVE8 + THUMB + + +; Vector Table Mapped to Address 0 at Reset + + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WDT_IRQHandler ; 0: Watchdog Timer + DCD RTC_IRQHandler ; 1: Real Time Clock + DCD TIM0_IRQHandler ; 2: Timer0 / Timer1 + DCD TIM2_IRQHandler ; 3: Timer2 / Timer3 + DCD MCIA_IRQHandler ; 4: MCIa + DCD MCIB_IRQHandler ; 5: MCIb + DCD UART0_IRQHandler ; 6: UART0 - DUT FPGA + DCD UART1_IRQHandler ; 7: UART1 - DUT FPGA + DCD UART2_IRQHandler ; 8: UART2 - DUT FPGA + DCD UART4_IRQHandler ; 9: UART4 - not connected + DCD AACI_IRQHandler ; 10: AACI / AC97 + DCD CLCD_IRQHandler ; 11: CLCD Combined Interrupt + DCD ENET_IRQHandler ; 12: Ethernet + DCD USBDC_IRQHandler ; 13: USB Device + DCD USBHC_IRQHandler ; 14: USB Host Controller + DCD CHLCD_IRQHandler ; 15: Character LCD + DCD FLEXRAY_IRQHandler ; 16: Flexray + DCD CAN_IRQHandler ; 17: CAN + DCD LIN_IRQHandler ; 18: LIN + DCD I2C_IRQHandler ; 19: I2C ADC/DAC + DCD 0 ; 20: Reserved + DCD 0 ; 21: Reserved + DCD 0 ; 22: Reserved + DCD 0 ; 23: Reserved + DCD 0 ; 24: Reserved + DCD 0 ; 25: Reserved + DCD 0 ; 26: Reserved + DCD 0 ; 27: Reserved + DCD CPU_CLCD_IRQHandler ; 28: Reserved - CPU FPGA CLCD + DCD 0 ; 29: Reserved - CPU FPGA + DCD UART3_IRQHandler ; 30: UART3 - CPU FPGA + DCD SPI_IRQHandler ; 31: SPI Touchscreen - CPU FPGA +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + + +; Reset Handler + +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT SystemInit + IMPORT __main + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT WDT_IRQHandler [WEAK] + EXPORT RTC_IRQHandler [WEAK] + EXPORT TIM0_IRQHandler [WEAK] + EXPORT TIM2_IRQHandler [WEAK] + EXPORT MCIA_IRQHandler [WEAK] + EXPORT MCIB_IRQHandler [WEAK] + EXPORT UART0_IRQHandler [WEAK] + EXPORT UART1_IRQHandler [WEAK] + EXPORT UART2_IRQHandler [WEAK] + EXPORT UART3_IRQHandler [WEAK] + EXPORT UART4_IRQHandler [WEAK] + EXPORT AACI_IRQHandler [WEAK] + EXPORT CLCD_IRQHandler [WEAK] + EXPORT ENET_IRQHandler [WEAK] + EXPORT USBDC_IRQHandler [WEAK] + EXPORT USBHC_IRQHandler [WEAK] + EXPORT CHLCD_IRQHandler [WEAK] + EXPORT FLEXRAY_IRQHandler [WEAK] + EXPORT CAN_IRQHandler [WEAK] + EXPORT LIN_IRQHandler [WEAK] + EXPORT I2C_IRQHandler [WEAK] + EXPORT CPU_CLCD_IRQHandler [WEAK] + EXPORT SPI_IRQHandler [WEAK] + +WDT_IRQHandler +RTC_IRQHandler +TIM0_IRQHandler +TIM2_IRQHandler +MCIA_IRQHandler +MCIB_IRQHandler +UART0_IRQHandler +UART1_IRQHandler +UART2_IRQHandler +UART3_IRQHandler +UART4_IRQHandler +AACI_IRQHandler +CLCD_IRQHandler +ENET_IRQHandler +USBDC_IRQHandler +USBHC_IRQHandler +CHLCD_IRQHandler +FLEXRAY_IRQHandler +CAN_IRQHandler +LIN_IRQHandler +I2C_IRQHandler +CPU_CLCD_IRQHandler +SPI_IRQHandler + B . + + ENDP + + + ALIGN + + +; User Initial Stack & Heap + + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap + +__user_initial_stackheap PROC + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + ENDP + + ALIGN + + ENDIF + + + END diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM0/system_ARMCM0.c b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM0/system_ARMCM0.c new file mode 100644 index 0000000..06e2138 --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM0/system_ARMCM0.c @@ -0,0 +1,56 @@ +/**************************************************************************//** + * @file system_ARMCM0.c + * @brief CMSIS Device System Source File for + * ARMCM0 Device Series + * @version V5.00 + * @date 08. April 2016 + ******************************************************************************/ +/* + * Copyright (c) 2009-2016 ARM Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ARMCM0.h" + +/*---------------------------------------------------------------------------- + Define clocks + *----------------------------------------------------------------------------*/ +#define XTAL ( 5000000U) /* Oscillator frequency */ + +#define SYSTEM_CLOCK (5 * XTAL) + + +/*---------------------------------------------------------------------------- + System Core Clock Variable + *----------------------------------------------------------------------------*/ +uint32_t SystemCoreClock = SYSTEM_CLOCK; + + +/*---------------------------------------------------------------------------- + System Core Clock update function + *----------------------------------------------------------------------------*/ +void SystemCoreClockUpdate (void) +{ + SystemCoreClock = SYSTEM_CLOCK; +} + +/*---------------------------------------------------------------------------- + System initialization function + *----------------------------------------------------------------------------*/ +void SystemInit (void) +{ + SystemCoreClock = SYSTEM_CLOCK; +} diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM3/startup_ARMCM3.s b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM3/startup_ARMCM3.s new file mode 100644 index 0000000..45b041b --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM3/startup_ARMCM3.s @@ -0,0 +1,262 @@ +;/**************************************************************************//** +; * @file startup_ARMCM3.s +; * @brief CMSIS Core Device Startup File for +; * ARMCM3 Device Series +; * @version V5.00 +; * @date 02. March 2016 +; ******************************************************************************/ +;/* +; * Copyright (c) 2009-2016 ARM Limited. All rights reserved. +; * +; * SPDX-License-Identifier: Apache-2.0 +; * +; * Licensed under the Apache License, Version 2.0 (the License); you may +; * not use this file except in compliance with the License. +; * You may obtain a copy of the License at +; * +; * www.apache.org/licenses/LICENSE-2.0 +; * +; * Unless required by applicable law or agreed to in writing, software +; * distributed under the License is distributed on an AS IS BASIS, WITHOUT +; * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +; * See the License for the specific language governing permissions and +; * limitations under the License. +; */ + +;/* +;//-------- <<< Use Configuration Wizard in Context Menu >>> ------------------ +;*/ + + +; Stack Configuration +; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Stack_Size EQU 0x00000400 + + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + + +; Heap Configuration +; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Heap_Size EQU 0x00080000 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + + PRESERVE8 + THUMB + + +; Vector Table Mapped to Address 0 at Reset + + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WDT_IRQHandler ; 0: Watchdog Timer + DCD RTC_IRQHandler ; 1: Real Time Clock + DCD TIM0_IRQHandler ; 2: Timer0 / Timer1 + DCD TIM2_IRQHandler ; 3: Timer2 / Timer3 + DCD MCIA_IRQHandler ; 4: MCIa + DCD MCIB_IRQHandler ; 5: MCIb + DCD UART0_IRQHandler ; 6: UART0 - DUT FPGA + DCD UART1_IRQHandler ; 7: UART1 - DUT FPGA + DCD UART2_IRQHandler ; 8: UART2 - DUT FPGA + DCD UART4_IRQHandler ; 9: UART4 - not connected + DCD AACI_IRQHandler ; 10: AACI / AC97 + DCD CLCD_IRQHandler ; 11: CLCD Combined Interrupt + DCD ENET_IRQHandler ; 12: Ethernet + DCD USBDC_IRQHandler ; 13: USB Device + DCD USBHC_IRQHandler ; 14: USB Host Controller + DCD CHLCD_IRQHandler ; 15: Character LCD + DCD FLEXRAY_IRQHandler ; 16: Flexray + DCD CAN_IRQHandler ; 17: CAN + DCD LIN_IRQHandler ; 18: LIN + DCD I2C_IRQHandler ; 19: I2C ADC/DAC + DCD 0 ; 20: Reserved + DCD 0 ; 21: Reserved + DCD 0 ; 22: Reserved + DCD 0 ; 23: Reserved + DCD 0 ; 24: Reserved + DCD 0 ; 25: Reserved + DCD 0 ; 26: Reserved + DCD 0 ; 27: Reserved + DCD CPU_CLCD_IRQHandler ; 28: Reserved - CPU FPGA CLCD + DCD 0 ; 29: Reserved - CPU FPGA + DCD UART3_IRQHandler ; 30: UART3 - CPU FPGA + DCD SPI_IRQHandler ; 31: SPI Touchscreen - CPU FPGA +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + + +; Reset Handler + +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT SystemInit + IMPORT __main + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +MemManage_Handler\ + PROC + EXPORT MemManage_Handler [WEAK] + B . + ENDP +BusFault_Handler\ + PROC + EXPORT BusFault_Handler [WEAK] + B . + ENDP +UsageFault_Handler\ + PROC + EXPORT UsageFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +DebugMon_Handler\ + PROC + EXPORT DebugMon_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT WDT_IRQHandler [WEAK] + EXPORT RTC_IRQHandler [WEAK] + EXPORT TIM0_IRQHandler [WEAK] + EXPORT TIM2_IRQHandler [WEAK] + EXPORT MCIA_IRQHandler [WEAK] + EXPORT MCIB_IRQHandler [WEAK] + EXPORT UART0_IRQHandler [WEAK] + EXPORT UART1_IRQHandler [WEAK] + EXPORT UART2_IRQHandler [WEAK] + EXPORT UART3_IRQHandler [WEAK] + EXPORT UART4_IRQHandler [WEAK] + EXPORT AACI_IRQHandler [WEAK] + EXPORT CLCD_IRQHandler [WEAK] + EXPORT ENET_IRQHandler [WEAK] + EXPORT USBDC_IRQHandler [WEAK] + EXPORT USBHC_IRQHandler [WEAK] + EXPORT CHLCD_IRQHandler [WEAK] + EXPORT FLEXRAY_IRQHandler [WEAK] + EXPORT CAN_IRQHandler [WEAK] + EXPORT LIN_IRQHandler [WEAK] + EXPORT I2C_IRQHandler [WEAK] + EXPORT CPU_CLCD_IRQHandler [WEAK] + EXPORT SPI_IRQHandler [WEAK] + +WDT_IRQHandler +RTC_IRQHandler +TIM0_IRQHandler +TIM2_IRQHandler +MCIA_IRQHandler +MCIB_IRQHandler +UART0_IRQHandler +UART1_IRQHandler +UART2_IRQHandler +UART3_IRQHandler +UART4_IRQHandler +AACI_IRQHandler +CLCD_IRQHandler +ENET_IRQHandler +USBDC_IRQHandler +USBHC_IRQHandler +CHLCD_IRQHandler +FLEXRAY_IRQHandler +CAN_IRQHandler +LIN_IRQHandler +I2C_IRQHandler +CPU_CLCD_IRQHandler +SPI_IRQHandler + B . + + ENDP + + + ALIGN + + +; User Initial Stack & Heap + + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap + +__user_initial_stackheap PROC + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + ENDP + + ALIGN + + ENDIF + + + END diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM3/system_ARMCM3.c b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM3/system_ARMCM3.c new file mode 100644 index 0000000..7b173b3 --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM3/system_ARMCM3.c @@ -0,0 +1,68 @@ +/**************************************************************************//** + * @file system_ARMCM3.c + * @brief CMSIS Device System Source File for + * ARMCM3 Device Series + * @version V5.00 + * @date 08. April 2016 + ******************************************************************************/ +/* + * Copyright (c) 2009-2016 ARM Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ARMCM3.h" + +/*---------------------------------------------------------------------------- + Define clocks + *----------------------------------------------------------------------------*/ +#define XTAL ( 5000000U) /* Oscillator frequency */ + +#define SYSTEM_CLOCK (5 * XTAL) + + +/*---------------------------------------------------------------------------- + Externals + *----------------------------------------------------------------------------*/ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1) + extern uint32_t __Vectors; +#endif + +/*---------------------------------------------------------------------------- + System Core Clock Variable + *----------------------------------------------------------------------------*/ +uint32_t SystemCoreClock = SYSTEM_CLOCK; + + +/*---------------------------------------------------------------------------- + System Core Clock update function + *----------------------------------------------------------------------------*/ +void SystemCoreClockUpdate (void) +{ + SystemCoreClock = SYSTEM_CLOCK; +} + +/*---------------------------------------------------------------------------- + System initialization function + *----------------------------------------------------------------------------*/ +void SystemInit (void) +{ + +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1) + SCB->VTOR = (uint32_t) &__Vectors; +#endif + + SystemCoreClock = SYSTEM_CLOCK; +} diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM4/startup_ARMCM4.s b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM4/startup_ARMCM4.s new file mode 100644 index 0000000..3935a8b --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM4/startup_ARMCM4.s @@ -0,0 +1,262 @@ +;/**************************************************************************//** +; * @file startup_ARMCM4.s +; * @brief CMSIS Core Device Startup File for +; * ARMCM4 Device Series +; * @version V5.00 +; * @date 02. March 2016 +; ******************************************************************************/ +;/* +; * Copyright (c) 2009-2016 ARM Limited. All rights reserved. +; * +; * SPDX-License-Identifier: Apache-2.0 +; * +; * Licensed under the Apache License, Version 2.0 (the License); you may +; * not use this file except in compliance with the License. +; * You may obtain a copy of the License at +; * +; * www.apache.org/licenses/LICENSE-2.0 +; * +; * Unless required by applicable law or agreed to in writing, software +; * distributed under the License is distributed on an AS IS BASIS, WITHOUT +; * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +; * See the License for the specific language governing permissions and +; * limitations under the License. +; */ + +;/* +;//-------- <<< Use Configuration Wizard in Context Menu >>> ------------------ +;*/ + + +; Stack Configuration +; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Stack_Size EQU 0x00000400 + + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + + +; Heap Configuration +; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Heap_Size EQU 0x00000C00 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + + PRESERVE8 + THUMB + + +; Vector Table Mapped to Address 0 at Reset + + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WDT_IRQHandler ; 0: Watchdog Timer + DCD RTC_IRQHandler ; 1: Real Time Clock + DCD TIM0_IRQHandler ; 2: Timer0 / Timer1 + DCD TIM2_IRQHandler ; 3: Timer2 / Timer3 + DCD MCIA_IRQHandler ; 4: MCIa + DCD MCIB_IRQHandler ; 5: MCIb + DCD UART0_IRQHandler ; 6: UART0 - DUT FPGA + DCD UART1_IRQHandler ; 7: UART1 - DUT FPGA + DCD UART2_IRQHandler ; 8: UART2 - DUT FPGA + DCD UART4_IRQHandler ; 9: UART4 - not connected + DCD AACI_IRQHandler ; 10: AACI / AC97 + DCD CLCD_IRQHandler ; 11: CLCD Combined Interrupt + DCD ENET_IRQHandler ; 12: Ethernet + DCD USBDC_IRQHandler ; 13: USB Device + DCD USBHC_IRQHandler ; 14: USB Host Controller + DCD CHLCD_IRQHandler ; 15: Character LCD + DCD FLEXRAY_IRQHandler ; 16: Flexray + DCD CAN_IRQHandler ; 17: CAN + DCD LIN_IRQHandler ; 18: LIN + DCD I2C_IRQHandler ; 19: I2C ADC/DAC + DCD 0 ; 20: Reserved + DCD 0 ; 21: Reserved + DCD 0 ; 22: Reserved + DCD 0 ; 23: Reserved + DCD 0 ; 24: Reserved + DCD 0 ; 25: Reserved + DCD 0 ; 26: Reserved + DCD 0 ; 27: Reserved + DCD CPU_CLCD_IRQHandler ; 28: Reserved - CPU FPGA CLCD + DCD 0 ; 29: Reserved - CPU FPGA + DCD UART3_IRQHandler ; 30: UART3 - CPU FPGA + DCD SPI_IRQHandler ; 31: SPI Touchscreen - CPU FPGA +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + + +; Reset Handler + +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT SystemInit + IMPORT __main + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +MemManage_Handler\ + PROC + EXPORT MemManage_Handler [WEAK] + B . + ENDP +BusFault_Handler\ + PROC + EXPORT BusFault_Handler [WEAK] + B . + ENDP +UsageFault_Handler\ + PROC + EXPORT UsageFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +DebugMon_Handler\ + PROC + EXPORT DebugMon_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT WDT_IRQHandler [WEAK] + EXPORT RTC_IRQHandler [WEAK] + EXPORT TIM0_IRQHandler [WEAK] + EXPORT TIM2_IRQHandler [WEAK] + EXPORT MCIA_IRQHandler [WEAK] + EXPORT MCIB_IRQHandler [WEAK] + EXPORT UART0_IRQHandler [WEAK] + EXPORT UART1_IRQHandler [WEAK] + EXPORT UART2_IRQHandler [WEAK] + EXPORT UART3_IRQHandler [WEAK] + EXPORT UART4_IRQHandler [WEAK] + EXPORT AACI_IRQHandler [WEAK] + EXPORT CLCD_IRQHandler [WEAK] + EXPORT ENET_IRQHandler [WEAK] + EXPORT USBDC_IRQHandler [WEAK] + EXPORT USBHC_IRQHandler [WEAK] + EXPORT CHLCD_IRQHandler [WEAK] + EXPORT FLEXRAY_IRQHandler [WEAK] + EXPORT CAN_IRQHandler [WEAK] + EXPORT LIN_IRQHandler [WEAK] + EXPORT I2C_IRQHandler [WEAK] + EXPORT CPU_CLCD_IRQHandler [WEAK] + EXPORT SPI_IRQHandler [WEAK] + +WDT_IRQHandler +RTC_IRQHandler +TIM0_IRQHandler +TIM2_IRQHandler +MCIA_IRQHandler +MCIB_IRQHandler +UART0_IRQHandler +UART1_IRQHandler +UART2_IRQHandler +UART3_IRQHandler +UART4_IRQHandler +AACI_IRQHandler +CLCD_IRQHandler +ENET_IRQHandler +USBDC_IRQHandler +USBHC_IRQHandler +CHLCD_IRQHandler +FLEXRAY_IRQHandler +CAN_IRQHandler +LIN_IRQHandler +I2C_IRQHandler +CPU_CLCD_IRQHandler +SPI_IRQHandler + B . + + ENDP + + + ALIGN + + +; User Initial Stack & Heap + + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap + +__user_initial_stackheap PROC + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + ENDP + + ALIGN + + ENDIF + + + END diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM4/system_ARMCM4.c b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM4/system_ARMCM4.c new file mode 100644 index 0000000..b58b29d --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM4/system_ARMCM4.c @@ -0,0 +1,83 @@ +/**************************************************************************//** + * @file system_ARMCM4.c + * @brief CMSIS Device System Source File for + * ARMCM4 Device Series + * @version V5.00 + * @date 07. September 2016 + ******************************************************************************/ +/* + * Copyright (c) 2009-2016 ARM Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined (ARMCM4) + #include "ARMCM4.h" +#elif defined (ARMCM4_FP) + #include "ARMCM4_FP.h" +#else + #error device not specified! +#endif + +/*---------------------------------------------------------------------------- + Define clocks + *----------------------------------------------------------------------------*/ +#define XTAL ( 5000000UL) /* Oscillator frequency */ + +#define SYSTEM_CLOCK (5U * XTAL) + + +/*---------------------------------------------------------------------------- + Externals + *----------------------------------------------------------------------------*/ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) + extern uint32_t __Vectors; +#endif + +/*---------------------------------------------------------------------------- + System Core Clock Variable + *----------------------------------------------------------------------------*/ +uint32_t SystemCoreClock = SYSTEM_CLOCK; + + +/*---------------------------------------------------------------------------- + System Core Clock update function + *----------------------------------------------------------------------------*/ +void SystemCoreClockUpdate (void) +{ + SystemCoreClock = SYSTEM_CLOCK; +} + +/*---------------------------------------------------------------------------- + System initialization function + *----------------------------------------------------------------------------*/ +void SystemInit (void) +{ + +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) + SCB->VTOR = (uint32_t) &__Vectors; +#endif + +#if defined (__FPU_USED) && (__FPU_USED == 1U) + SCB->CPACR |= ((3U << 10U*2U) | /* set CP10 Full Access */ + (3U << 11U*2U) ); /* set CP11 Full Access */ +#endif + +#ifdef UNALIGNED_SUPPORT_DISABLE + SCB->CCR |= SCB_CCR_UNALIGN_TRP_Msk; +#endif + + SystemCoreClock = SYSTEM_CLOCK; +} diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM4_FP/startup_ARMCM4.s b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM4_FP/startup_ARMCM4.s new file mode 100644 index 0000000..f6a29ed --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM4_FP/startup_ARMCM4.s @@ -0,0 +1,262 @@ +;/**************************************************************************//** +; * @file startup_ARMCM4.s +; * @brief CMSIS Core Device Startup File for +; * ARMCM4 Device Series +; * @version V5.00 +; * @date 02. March 2016 +; ******************************************************************************/ +;/* +; * Copyright (c) 2009-2016 ARM Limited. All rights reserved. +; * +; * SPDX-License-Identifier: Apache-2.0 +; * +; * Licensed under the Apache License, Version 2.0 (the License); you may +; * not use this file except in compliance with the License. +; * You may obtain a copy of the License at +; * +; * www.apache.org/licenses/LICENSE-2.0 +; * +; * Unless required by applicable law or agreed to in writing, software +; * distributed under the License is distributed on an AS IS BASIS, WITHOUT +; * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +; * See the License for the specific language governing permissions and +; * limitations under the License. +; */ + +;/* +;//-------- <<< Use Configuration Wizard in Context Menu >>> ------------------ +;*/ + + +; Stack Configuration +; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Stack_Size EQU 0x00004000 + + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + + +; Heap Configuration +; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Heap_Size EQU 0x00100000 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + + PRESERVE8 + THUMB + + +; Vector Table Mapped to Address 0 at Reset + + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WDT_IRQHandler ; 0: Watchdog Timer + DCD RTC_IRQHandler ; 1: Real Time Clock + DCD TIM0_IRQHandler ; 2: Timer0 / Timer1 + DCD TIM2_IRQHandler ; 3: Timer2 / Timer3 + DCD MCIA_IRQHandler ; 4: MCIa + DCD MCIB_IRQHandler ; 5: MCIb + DCD UART0_IRQHandler ; 6: UART0 - DUT FPGA + DCD UART1_IRQHandler ; 7: UART1 - DUT FPGA + DCD UART2_IRQHandler ; 8: UART2 - DUT FPGA + DCD UART4_IRQHandler ; 9: UART4 - not connected + DCD AACI_IRQHandler ; 10: AACI / AC97 + DCD CLCD_IRQHandler ; 11: CLCD Combined Interrupt + DCD ENET_IRQHandler ; 12: Ethernet + DCD USBDC_IRQHandler ; 13: USB Device + DCD USBHC_IRQHandler ; 14: USB Host Controller + DCD CHLCD_IRQHandler ; 15: Character LCD + DCD FLEXRAY_IRQHandler ; 16: Flexray + DCD CAN_IRQHandler ; 17: CAN + DCD LIN_IRQHandler ; 18: LIN + DCD I2C_IRQHandler ; 19: I2C ADC/DAC + DCD 0 ; 20: Reserved + DCD 0 ; 21: Reserved + DCD 0 ; 22: Reserved + DCD 0 ; 23: Reserved + DCD 0 ; 24: Reserved + DCD 0 ; 25: Reserved + DCD 0 ; 26: Reserved + DCD 0 ; 27: Reserved + DCD CPU_CLCD_IRQHandler ; 28: Reserved - CPU FPGA CLCD + DCD 0 ; 29: Reserved - CPU FPGA + DCD UART3_IRQHandler ; 30: UART3 - CPU FPGA + DCD SPI_IRQHandler ; 31: SPI Touchscreen - CPU FPGA +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + + +; Reset Handler + +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT SystemInit + IMPORT __main + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +MemManage_Handler\ + PROC + EXPORT MemManage_Handler [WEAK] + B . + ENDP +BusFault_Handler\ + PROC + EXPORT BusFault_Handler [WEAK] + B . + ENDP +UsageFault_Handler\ + PROC + EXPORT UsageFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +DebugMon_Handler\ + PROC + EXPORT DebugMon_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT WDT_IRQHandler [WEAK] + EXPORT RTC_IRQHandler [WEAK] + EXPORT TIM0_IRQHandler [WEAK] + EXPORT TIM2_IRQHandler [WEAK] + EXPORT MCIA_IRQHandler [WEAK] + EXPORT MCIB_IRQHandler [WEAK] + EXPORT UART0_IRQHandler [WEAK] + EXPORT UART1_IRQHandler [WEAK] + EXPORT UART2_IRQHandler [WEAK] + EXPORT UART3_IRQHandler [WEAK] + EXPORT UART4_IRQHandler [WEAK] + EXPORT AACI_IRQHandler [WEAK] + EXPORT CLCD_IRQHandler [WEAK] + EXPORT ENET_IRQHandler [WEAK] + EXPORT USBDC_IRQHandler [WEAK] + EXPORT USBHC_IRQHandler [WEAK] + EXPORT CHLCD_IRQHandler [WEAK] + EXPORT FLEXRAY_IRQHandler [WEAK] + EXPORT CAN_IRQHandler [WEAK] + EXPORT LIN_IRQHandler [WEAK] + EXPORT I2C_IRQHandler [WEAK] + EXPORT CPU_CLCD_IRQHandler [WEAK] + EXPORT SPI_IRQHandler [WEAK] + +WDT_IRQHandler +RTC_IRQHandler +TIM0_IRQHandler +TIM2_IRQHandler +MCIA_IRQHandler +MCIB_IRQHandler +UART0_IRQHandler +UART1_IRQHandler +UART2_IRQHandler +UART3_IRQHandler +UART4_IRQHandler +AACI_IRQHandler +CLCD_IRQHandler +ENET_IRQHandler +USBDC_IRQHandler +USBHC_IRQHandler +CHLCD_IRQHandler +FLEXRAY_IRQHandler +CAN_IRQHandler +LIN_IRQHandler +I2C_IRQHandler +CPU_CLCD_IRQHandler +SPI_IRQHandler + B . + + ENDP + + + ALIGN + + +; User Initial Stack & Heap + + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap + +__user_initial_stackheap PROC + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + ENDP + + ALIGN + + ENDIF + + + END diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM4_FP/system_ARMCM4.c b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM4_FP/system_ARMCM4.c new file mode 100644 index 0000000..a7a3d6b --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM4_FP/system_ARMCM4.c @@ -0,0 +1,83 @@ +/**************************************************************************//** + * @file system_ARMCM4.c + * @brief CMSIS Device System Source File for + * ARMCM4 Device Series + * @version V5.00 + * @date 08. April 2016 + ******************************************************************************/ +/* + * Copyright (c) 2009-2016 ARM Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined (ARMCM4) + #include "ARMCM4.h" +#elif defined (ARMCM4_FP) + #include "ARMCM4_FP.h" +#else + #error device not specified! +#endif + +/*---------------------------------------------------------------------------- + Define clocks + *----------------------------------------------------------------------------*/ +#define XTAL ( 5000000U) /* Oscillator frequency */ + +#define SYSTEM_CLOCK (5 * XTAL) + + +/*---------------------------------------------------------------------------- + Externals + *----------------------------------------------------------------------------*/ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1) + extern uint32_t __Vectors; +#endif + +/*---------------------------------------------------------------------------- + System Core Clock Variable + *----------------------------------------------------------------------------*/ +uint32_t SystemCoreClock = SYSTEM_CLOCK; + + +/*---------------------------------------------------------------------------- + System Core Clock update function + *----------------------------------------------------------------------------*/ +void SystemCoreClockUpdate (void) +{ + SystemCoreClock = SYSTEM_CLOCK; +} + +/*---------------------------------------------------------------------------- + System initialization function + *----------------------------------------------------------------------------*/ +void SystemInit (void) +{ + +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1) + SCB->VTOR = (uint32_t) &__Vectors; +#endif + +#if defined (__FPU_USED) && (__FPU_USED == 1) + SCB->CPACR |= ((3U << 10*2) | /* set CP10 Full Access */ + (3U << 11*2) ); /* set CP11 Full Access */ +#endif + +#ifdef UNALIGNED_SUPPORT_DISABLE + SCB->CCR |= SCB_CCR_UNALIGN_TRP_Msk; +#endif + + SystemCoreClock = SYSTEM_CLOCK; +} diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM7_SP/startup_ARMCM7.c b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM7_SP/startup_ARMCM7.c new file mode 100644 index 0000000..114af76 --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM7_SP/startup_ARMCM7.c @@ -0,0 +1,295 @@ +/**************************************************************************//** + * @file startup_ARMCM7.s + * @brief CMSIS Core Device Startup File for + * ARMCM7 Device Series + * @version V5.00 + * @date 26. April 2016 + ******************************************************************************/ +/* + * Copyright (c) 2009-2016 ARM Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + + +/*---------------------------------------------------------------------------- + Linker generated Symbols + *----------------------------------------------------------------------------*/ +extern uint32_t __etext; +extern uint32_t __data_start__; +extern uint32_t __data_end__; +extern uint32_t __copy_table_start__; +extern uint32_t __copy_table_end__; +extern uint32_t __zero_table_start__; +extern uint32_t __zero_table_end__; +extern uint32_t __bss_start__; +extern uint32_t __bss_end__; +extern uint32_t __StackTop; + +/*---------------------------------------------------------------------------- + Exception / Interrupt Handler Function Prototype + *----------------------------------------------------------------------------*/ +typedef void( *pFunc )( void ); + + +/*---------------------------------------------------------------------------- + External References + *----------------------------------------------------------------------------*/ +#ifndef __START +extern void _start(void) __attribute__((noreturn)); /* PreeMain (C library entry point) */ +#else +extern int __START(void) __attribute__((noreturn)); /* main entry point */ +#endif + +#ifndef __NO_SYSTEM_INIT +extern void SystemInit (void); /* CMSIS System Initialization */ +#endif + + +/*---------------------------------------------------------------------------- + Internal References + *----------------------------------------------------------------------------*/ +void Default_Handler(void); /* Default empty handler */ +void Reset_Handler(void); /* Reset Handler */ + + +/*---------------------------------------------------------------------------- + User Initial Stack & Heap + *----------------------------------------------------------------------------*/ +#ifndef __STACK_SIZE + #define __STACK_SIZE 0x00000400 +#endif +static uint8_t stack[__STACK_SIZE] __attribute__ ((aligned(8), used, section(".stack"))); + +#ifndef __HEAP_SIZE + #define __HEAP_SIZE 0x00000C00 +#endif +#if __HEAP_SIZE > 0 +static uint8_t heap[__HEAP_SIZE] __attribute__ ((aligned(8), used, section(".heap"))); +#endif + + +/*---------------------------------------------------------------------------- + Exception / Interrupt Handler + *----------------------------------------------------------------------------*/ +/* Cortex-M7 Processor Exceptions */ +void NMI_Handler (void) __attribute__ ((weak, alias("Default_Handler"))); +void HardFault_Handler (void) __attribute__ ((weak, alias("Default_Handler"))); +void MemManage_Handler (void) __attribute__ ((weak, alias("Default_Handler"))); +void BusFault_Handler (void) __attribute__ ((weak, alias("Default_Handler"))); +void UsageFault_Handler (void) __attribute__ ((weak, alias("Default_Handler"))); +void SVC_Handler (void) __attribute__ ((weak, alias("Default_Handler"))); +void DebugMon_Handler (void) __attribute__ ((weak, alias("Default_Handler"))); +void PendSV_Handler (void) __attribute__ ((weak, alias("Default_Handler"))); +void SysTick_Handler (void) __attribute__ ((weak, alias("Default_Handler"))); + +/* ARMCM7 Specific Interrupts */ +void WDT_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"))); +void RTC_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"))); +void TIM0_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"))); +void TIM2_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"))); +void MCIA_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"))); +void MCIB_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"))); +void UART0_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"))); +void UART1_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"))); +void UART2_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"))); +void UART4_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"))); +void AACI_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"))); +void CLCD_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"))); +void ENET_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"))); +void USBDC_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"))); +void USBHC_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"))); +void CHLCD_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"))); +void FLEXRAY_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"))); +void CAN_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"))); +void LIN_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"))); +void I2C_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"))); +void CPU_CLCD_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"))); +void UART3_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"))); +void SPI_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"))); + + +/*---------------------------------------------------------------------------- + Exception / Interrupt Vector table + *----------------------------------------------------------------------------*/ +const pFunc __Vectors[] __attribute__ ((section(".vectors"))) = { + /* Cortex-M7 Exceptions Handler */ + (pFunc)((uint32_t)&__StackTop), /* Initial Stack Pointer */ + Reset_Handler, /* Reset Handler */ + NMI_Handler, /* NMI Handler */ + HardFault_Handler, /* Hard Fault Handler */ + MemManage_Handler, /* MPU Fault Handler */ + BusFault_Handler, /* Bus Fault Handler */ + UsageFault_Handler, /* Usage Fault Handler */ + 0, /* Reserved */ + 0, /* Reserved */ + 0, /* Reserved */ + 0, /* Reserved */ + SVC_Handler, /* SVCall Handler */ + DebugMon_Handler, /* Debug Monitor Handler */ + 0, /* Reserved */ + PendSV_Handler, /* PendSV Handler */ + SysTick_Handler, /* SysTick Handler */ + + /* External interrupts */ + WDT_IRQHandler, /* 0: Watchdog Timer */ + RTC_IRQHandler, /* 1: Real Time Clock */ + TIM0_IRQHandler, /* 2: Timer0 / Timer1 */ + TIM2_IRQHandler, /* 3: Timer2 / Timer3 */ + MCIA_IRQHandler, /* 4: MCIa */ + MCIB_IRQHandler, /* 5: MCIb */ + UART0_IRQHandler, /* 6: UART0 - DUT FPGA */ + UART1_IRQHandler, /* 7: UART1 - DUT FPGA */ + UART2_IRQHandler, /* 8: UART2 - DUT FPGA */ + UART4_IRQHandler, /* 9: UART4 - not connected */ + AACI_IRQHandler, /* 10: AACI / AC97 */ + CLCD_IRQHandler, /* 11: CLCD Combined Interrupt */ + ENET_IRQHandler, /* 12: Ethernet */ + USBDC_IRQHandler, /* 13: USB Device */ + USBHC_IRQHandler, /* 14: USB Host Controller */ + CHLCD_IRQHandler, /* 15: Character LCD */ + FLEXRAY_IRQHandler, /* 16: Flexray */ + CAN_IRQHandler, /* 17: CAN */ + LIN_IRQHandler, /* 18: LIN */ + I2C_IRQHandler, /* 19: I2C ADC/DAC */ + 0, /* 20: Reserved */ + 0, /* 21: Reserved */ + 0, /* 22: Reserved */ + 0, /* 23: Reserved */ + 0, /* 24: Reserved */ + 0, /* 25: Reserved */ + 0, /* 26: Reserved */ + 0, /* 27: Reserved */ + CPU_CLCD_IRQHandler, /* 28: Reserved - CPU FPGA CLCD */ + 0, /* 29: Reserved - CPU FPGA */ + UART3_IRQHandler, /* 30: UART3 - CPU FPGA */ + SPI_IRQHandler /* 31: SPI Touchscreen - CPU FPGA */ +}; + + +/*---------------------------------------------------------------------------- + Reset Handler called on controller reset + *----------------------------------------------------------------------------*/ +void Reset_Handler(void) { + uint32_t *pSrc, *pDest; + uint32_t *pTable __attribute__((unused)); + +/* Firstly it copies data from read only memory to RAM. There are two schemes + * to copy. One can copy more than one sections. Another can only copy + * one section. The former scheme needs more instructions and read-only + * data to implement than the latter. + * Macro __STARTUP_COPY_MULTIPLE is used to choose between two schemes. */ + +#ifdef __STARTUP_COPY_MULTIPLE +/* Multiple sections scheme. + * + * Between symbol address __copy_table_start__ and __copy_table_end__, + * there are array of triplets, each of which specify: + * offset 0: LMA of start of a section to copy from + * offset 4: VMA of start of a section to copy to + * offset 8: size of the section to copy. Must be multiply of 4 + * + * All addresses must be aligned to 4 bytes boundary. + */ + pTable = &__copy_table_start__; + + for (; pTable < &__copy_table_end__; pTable = pTable + 3) { + pSrc = (uint32_t*)*(pTable + 0); + pDest = (uint32_t*)*(pTable + 1); + for (; pDest < (uint32_t*)(*(pTable + 1) + *(pTable + 2)) ; ) { + *pDest++ = *pSrc++; + } + } +#else +/* Single section scheme. + * + * The ranges of copy from/to are specified by following symbols + * __etext: LMA of start of the section to copy from. Usually end of text + * __data_start__: VMA of start of the section to copy to + * __data_end__: VMA of end of the section to copy to + * + * All addresses must be aligned to 4 bytes boundary. + */ + pSrc = &__etext; + pDest = &__data_start__; + + for ( ; pDest < &__data_end__ ; ) { + *pDest++ = *pSrc++; + } +#endif /*__STARTUP_COPY_MULTIPLE */ + +/* This part of work usually is done in C library startup code. Otherwise, + * define this macro to enable it in this startup. + * + * There are two schemes too. One can clear multiple BSS sections. Another + * can only clear one section. The former is more size expensive than the + * latter. + * + * Define macro __STARTUP_CLEAR_BSS_MULTIPLE to choose the former. + * Otherwise efine macro __STARTUP_CLEAR_BSS to choose the later. + */ +#ifdef __STARTUP_CLEAR_BSS_MULTIPLE +/* Multiple sections scheme. + * + * Between symbol address __copy_table_start__ and __copy_table_end__, + * there are array of tuples specifying: + * offset 0: Start of a BSS section + * offset 4: Size of this BSS section. Must be multiply of 4 + */ + pTable = &__zero_table_start__; + + for (; pTable < &__zero_table_end__; pTable = pTable + 2) { + pDest = (uint32_t*)*(pTable + 0); + for (; pDest < (uint32_t*)(*(pTable + 0) + *(pTable + 1)) ; ) { + *pDest++ = 0; + } + } +#elif defined (__STARTUP_CLEAR_BSS) +/* Single BSS section scheme. + * + * The BSS section is specified by following symbols + * __bss_start__: start of the BSS section. + * __bss_end__: end of the BSS section. + * + * Both addresses must be aligned to 4 bytes boundary. + */ + pDest = &__bss_start__; + + for ( ; pDest < &__bss_end__ ; ) { + *pDest++ = 0UL; + } +#endif /* __STARTUP_CLEAR_BSS_MULTIPLE || __STARTUP_CLEAR_BSS */ + +#ifndef __NO_SYSTEM_INIT + SystemInit(); +#endif + +#ifndef __START +#define __START _start +#endif + __START(); + +} + + +/*---------------------------------------------------------------------------- + Default Handler for Exceptions / Interrupts + *----------------------------------------------------------------------------*/ +void Default_Handler(void) { + + while(1); +} diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM7_SP/startup_ARMCM7.s b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM7_SP/startup_ARMCM7.s new file mode 100644 index 0000000..d852dec --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM7_SP/startup_ARMCM7.s @@ -0,0 +1,262 @@ +;/**************************************************************************//** +; * @file startup_ARMCM7.s +; * @brief CMSIS Core Device Startup File for +; * ARMCM7 Device Series +; * @version V5.00 +; * @date 02. March 2016 +; ******************************************************************************/ +;/* +; * Copyright (c) 2009-2016 ARM Limited. All rights reserved. +; * +; * SPDX-License-Identifier: Apache-2.0 +; * +; * Licensed under the Apache License, Version 2.0 (the License); you may +; * not use this file except in compliance with the License. +; * You may obtain a copy of the License at +; * +; * www.apache.org/licenses/LICENSE-2.0 +; * +; * Unless required by applicable law or agreed to in writing, software +; * distributed under the License is distributed on an AS IS BASIS, WITHOUT +; * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +; * See the License for the specific language governing permissions and +; * limitations under the License. +; */ + +;/* +;//-------- <<< Use Configuration Wizard in Context Menu >>> ------------------ +;*/ + + +; Stack Configuration +; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Stack_Size EQU 0x00000400 + + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + + +; Heap Configuration +; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Heap_Size EQU 0x00080000 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + + PRESERVE8 + THUMB + + +; Vector Table Mapped to Address 0 at Reset + + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WDT_IRQHandler ; 0: Watchdog Timer + DCD RTC_IRQHandler ; 1: Real Time Clock + DCD TIM0_IRQHandler ; 2: Timer0 / Timer1 + DCD TIM2_IRQHandler ; 3: Timer2 / Timer3 + DCD MCIA_IRQHandler ; 4: MCIa + DCD MCIB_IRQHandler ; 5: MCIb + DCD UART0_IRQHandler ; 6: UART0 - DUT FPGA + DCD UART1_IRQHandler ; 7: UART1 - DUT FPGA + DCD UART2_IRQHandler ; 8: UART2 - DUT FPGA + DCD UART4_IRQHandler ; 9: UART4 - not connected + DCD AACI_IRQHandler ; 10: AACI / AC97 + DCD CLCD_IRQHandler ; 11: CLCD Combined Interrupt + DCD ENET_IRQHandler ; 12: Ethernet + DCD USBDC_IRQHandler ; 13: USB Device + DCD USBHC_IRQHandler ; 14: USB Host Controller + DCD CHLCD_IRQHandler ; 15: Character LCD + DCD FLEXRAY_IRQHandler ; 16: Flexray + DCD CAN_IRQHandler ; 17: CAN + DCD LIN_IRQHandler ; 18: LIN + DCD I2C_IRQHandler ; 19: I2C ADC/DAC + DCD 0 ; 20: Reserved + DCD 0 ; 21: Reserved + DCD 0 ; 22: Reserved + DCD 0 ; 23: Reserved + DCD 0 ; 24: Reserved + DCD 0 ; 25: Reserved + DCD 0 ; 26: Reserved + DCD 0 ; 27: Reserved + DCD CPU_CLCD_IRQHandler ; 28: Reserved - CPU FPGA CLCD + DCD 0 ; 29: Reserved - CPU FPGA + DCD UART3_IRQHandler ; 30: UART3 - CPU FPGA + DCD SPI_IRQHandler ; 31: SPI Touchscreen - CPU FPGA +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + + +; Reset Handler + +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT SystemInit + IMPORT __main + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +MemManage_Handler\ + PROC + EXPORT MemManage_Handler [WEAK] + B . + ENDP +BusFault_Handler\ + PROC + EXPORT BusFault_Handler [WEAK] + B . + ENDP +UsageFault_Handler\ + PROC + EXPORT UsageFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +DebugMon_Handler\ + PROC + EXPORT DebugMon_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT WDT_IRQHandler [WEAK] + EXPORT RTC_IRQHandler [WEAK] + EXPORT TIM0_IRQHandler [WEAK] + EXPORT TIM2_IRQHandler [WEAK] + EXPORT MCIA_IRQHandler [WEAK] + EXPORT MCIB_IRQHandler [WEAK] + EXPORT UART0_IRQHandler [WEAK] + EXPORT UART1_IRQHandler [WEAK] + EXPORT UART2_IRQHandler [WEAK] + EXPORT UART3_IRQHandler [WEAK] + EXPORT UART4_IRQHandler [WEAK] + EXPORT AACI_IRQHandler [WEAK] + EXPORT CLCD_IRQHandler [WEAK] + EXPORT ENET_IRQHandler [WEAK] + EXPORT USBDC_IRQHandler [WEAK] + EXPORT USBHC_IRQHandler [WEAK] + EXPORT CHLCD_IRQHandler [WEAK] + EXPORT FLEXRAY_IRQHandler [WEAK] + EXPORT CAN_IRQHandler [WEAK] + EXPORT LIN_IRQHandler [WEAK] + EXPORT I2C_IRQHandler [WEAK] + EXPORT CPU_CLCD_IRQHandler [WEAK] + EXPORT SPI_IRQHandler [WEAK] + +WDT_IRQHandler +RTC_IRQHandler +TIM0_IRQHandler +TIM2_IRQHandler +MCIA_IRQHandler +MCIB_IRQHandler +UART0_IRQHandler +UART1_IRQHandler +UART2_IRQHandler +UART3_IRQHandler +UART4_IRQHandler +AACI_IRQHandler +CLCD_IRQHandler +ENET_IRQHandler +USBDC_IRQHandler +USBHC_IRQHandler +CHLCD_IRQHandler +FLEXRAY_IRQHandler +CAN_IRQHandler +LIN_IRQHandler +I2C_IRQHandler +CPU_CLCD_IRQHandler +SPI_IRQHandler + B . + + ENDP + + + ALIGN + + +; User Initial Stack & Heap + + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap + +__user_initial_stackheap PROC + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + ENDP + + ALIGN + + ENDIF + + + END diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM7_SP/system_ARMCM7.c b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM7_SP/system_ARMCM7.c new file mode 100644 index 0000000..d74ac27 --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/ARMCM7_SP/system_ARMCM7.c @@ -0,0 +1,85 @@ +/**************************************************************************//** + * @file system_ARMCM7.c + * @brief CMSIS Device System Source File for + * ARMCM7 Device Series + * @version V5.00 + * @date 08. April 2016 + ******************************************************************************/ +/* + * Copyright (c) 2009-2016 ARM Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined (ARMCM7) + #include "ARMCM7.h" +#elif defined (ARMCM7_SP) + #include "ARMCM7_SP.h" +#elif defined (ARMCM7_DP) + #include "ARMCM7_DP.h" +#else + #error device not specified! +#endif + +/*---------------------------------------------------------------------------- + Define clocks + *----------------------------------------------------------------------------*/ +#define XTAL ( 5000000U) /* Oscillator frequency */ + +#define SYSTEM_CLOCK (5 * XTAL) + + +/*---------------------------------------------------------------------------- + Externals + *----------------------------------------------------------------------------*/ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1) + extern uint32_t __Vectors; +#endif + +/*---------------------------------------------------------------------------- + System Core Clock Variable + *----------------------------------------------------------------------------*/ +uint32_t SystemCoreClock = SYSTEM_CLOCK; + + +/*---------------------------------------------------------------------------- + System Core Clock update function + *----------------------------------------------------------------------------*/ +void SystemCoreClockUpdate (void) +{ + SystemCoreClock = SYSTEM_CLOCK; +} + +/*---------------------------------------------------------------------------- + System initialization function + *----------------------------------------------------------------------------*/ +void SystemInit (void) +{ + +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1) + SCB->VTOR = (uint32_t) &__Vectors; +#endif + +#if defined (__FPU_USED) && (__FPU_USED == 1) + SCB->CPACR |= ((3U << 10*2) | /* set CP10 Full Access */ + (3U << 11*2) ); /* set CP11 Full Access */ +#endif + +#ifdef UNALIGNED_SUPPORT_DISABLE + SCB->CCR |= SCB_CCR_UNALIGN_TRP_Msk; +#endif + + SystemCoreClock = SYSTEM_CLOCK; +} diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/STM32F411RETx/startup_stm32f411xe.s b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/STM32F411RETx/startup_stm32f411xe.s new file mode 100644 index 0000000..c55a8db --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/STM32F411RETx/startup_stm32f411xe.s @@ -0,0 +1,395 @@ +;******************** (C) COPYRIGHT 2016 STMicroelectronics ******************** +;* File Name : startup_stm32f411xe.s +;* Author : MCD Application Team +;* Version : V2.6.0 +;* Date : 04-November-2016 +;* Description : STM32F411xExx devices vector table for MDK-ARM toolchain. +;* This module performs: +;* - Set the initial SP +;* - Set the initial PC == Reset_Handler +;* - Set the vector table entries with the exceptions ISR address +;* - Branches to __main in the C library (which eventually +;* calls main()). +;* After Reset the CortexM4 processor is in Thread mode, +;* priority is Privileged, and the Stack is set to Main. +;* <<< Use Configuration Wizard in Context Menu >>> +;******************************************************************************* +; +;* Redistribution and use in source and binary forms, with or without modification, +;* are permitted provided that the following conditions are met: +;* 1. Redistributions of source code must retain the above copyright notice, +;* this list of conditions and the following disclaimer. +;* 2. Redistributions in binary form must reproduce the above copyright notice, +;* this list of conditions and the following disclaimer in the documentation +;* and/or other materials provided with the distribution. +;* 3. Neither the name of STMicroelectronics nor the names of its contributors +;* may be used to endorse or promote products derived from this software +;* without specific prior written permission. +;* +;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +;* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +;* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +;* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +;* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +; +;******************************************************************************* + +; Amount of memory (in bytes) allocated for Stack +; Tailor this value to your application needs +; Stack Configuration +; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Stack_Size EQU 0x00000400 + + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + + +; Heap Configuration +; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Heap_Size EQU 0x00000200 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + PRESERVE8 + THUMB + + +; Vector Table Mapped to Address 0 at Reset + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WWDG_IRQHandler ; Window WatchDog + DCD PVD_IRQHandler ; PVD through EXTI Line detection + DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line + DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line + DCD FLASH_IRQHandler ; FLASH + DCD RCC_IRQHandler ; RCC + DCD EXTI0_IRQHandler ; EXTI Line0 + DCD EXTI1_IRQHandler ; EXTI Line1 + DCD EXTI2_IRQHandler ; EXTI Line2 + DCD EXTI3_IRQHandler ; EXTI Line3 + DCD EXTI4_IRQHandler ; EXTI Line4 + DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 + DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 + DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 + DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 + DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 + DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 + DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 + DCD ADC_IRQHandler ; ADC1, ADC2 and ADC3s + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD EXTI9_5_IRQHandler ; External Line[9:5]s + DCD TIM1_BRK_TIM9_IRQHandler ; TIM1 Break and TIM9 + DCD TIM1_UP_TIM10_IRQHandler ; TIM1 Update and TIM10 + DCD TIM1_TRG_COM_TIM11_IRQHandler ; TIM1 Trigger and Commutation and TIM11 + DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare + DCD TIM2_IRQHandler ; TIM2 + DCD TIM3_IRQHandler ; TIM3 + DCD TIM4_IRQHandler ; TIM4 + DCD I2C1_EV_IRQHandler ; I2C1 Event + DCD I2C1_ER_IRQHandler ; I2C1 Error + DCD I2C2_EV_IRQHandler ; I2C2 Event + DCD I2C2_ER_IRQHandler ; I2C2 Error + DCD SPI1_IRQHandler ; SPI1 + DCD SPI2_IRQHandler ; SPI2 + DCD USART1_IRQHandler ; USART1 + DCD USART2_IRQHandler ; USART2 + DCD 0 ; Reserved + DCD EXTI15_10_IRQHandler ; External Line[15:10]s + DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line + DCD OTG_FS_WKUP_IRQHandler ; USB OTG FS Wakeup through EXTI line + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 + DCD 0 ; Reserved + DCD SDIO_IRQHandler ; SDIO + DCD TIM5_IRQHandler ; TIM5 + DCD SPI3_IRQHandler ; SPI3 + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 + DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 + DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 + DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 + DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD OTG_FS_IRQHandler ; USB OTG FS + DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 + DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 + DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 + DCD USART6_IRQHandler ; USART6 + DCD I2C3_EV_IRQHandler ; I2C3 event + DCD I2C3_ER_IRQHandler ; I2C3 error + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD FPU_IRQHandler ; FPU + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SPI4_IRQHandler ; SPI4 + DCD SPI5_IRQHandler ; SPI5 + +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + +; Reset handler +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT SystemInit + IMPORT __main + + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +MemManage_Handler\ + PROC + EXPORT MemManage_Handler [WEAK] + B . + ENDP +BusFault_Handler\ + PROC + EXPORT BusFault_Handler [WEAK] + B . + ENDP +UsageFault_Handler\ + PROC + EXPORT UsageFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +DebugMon_Handler\ + PROC + EXPORT DebugMon_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT WWDG_IRQHandler [WEAK] + EXPORT PVD_IRQHandler [WEAK] + EXPORT TAMP_STAMP_IRQHandler [WEAK] + EXPORT RTC_WKUP_IRQHandler [WEAK] + EXPORT FLASH_IRQHandler [WEAK] + EXPORT RCC_IRQHandler [WEAK] + EXPORT EXTI0_IRQHandler [WEAK] + EXPORT EXTI1_IRQHandler [WEAK] + EXPORT EXTI2_IRQHandler [WEAK] + EXPORT EXTI3_IRQHandler [WEAK] + EXPORT EXTI4_IRQHandler [WEAK] + EXPORT DMA1_Stream0_IRQHandler [WEAK] + EXPORT DMA1_Stream1_IRQHandler [WEAK] + EXPORT DMA1_Stream2_IRQHandler [WEAK] + EXPORT DMA1_Stream3_IRQHandler [WEAK] + EXPORT DMA1_Stream4_IRQHandler [WEAK] + EXPORT DMA1_Stream5_IRQHandler [WEAK] + EXPORT DMA1_Stream6_IRQHandler [WEAK] + EXPORT ADC_IRQHandler [WEAK] + EXPORT EXTI9_5_IRQHandler [WEAK] + EXPORT TIM1_BRK_TIM9_IRQHandler [WEAK] + EXPORT TIM1_UP_TIM10_IRQHandler [WEAK] + EXPORT TIM1_TRG_COM_TIM11_IRQHandler [WEAK] + EXPORT TIM1_CC_IRQHandler [WEAK] + EXPORT TIM2_IRQHandler [WEAK] + EXPORT TIM3_IRQHandler [WEAK] + EXPORT TIM4_IRQHandler [WEAK] + EXPORT I2C1_EV_IRQHandler [WEAK] + EXPORT I2C1_ER_IRQHandler [WEAK] + EXPORT I2C2_EV_IRQHandler [WEAK] + EXPORT I2C2_ER_IRQHandler [WEAK] + EXPORT SPI1_IRQHandler [WEAK] + EXPORT SPI2_IRQHandler [WEAK] + EXPORT USART1_IRQHandler [WEAK] + EXPORT USART2_IRQHandler [WEAK] + EXPORT EXTI15_10_IRQHandler [WEAK] + EXPORT RTC_Alarm_IRQHandler [WEAK] + EXPORT OTG_FS_WKUP_IRQHandler [WEAK] + EXPORT DMA1_Stream7_IRQHandler [WEAK] + EXPORT SDIO_IRQHandler [WEAK] + EXPORT TIM5_IRQHandler [WEAK] + EXPORT SPI3_IRQHandler [WEAK] + EXPORT DMA2_Stream0_IRQHandler [WEAK] + EXPORT DMA2_Stream1_IRQHandler [WEAK] + EXPORT DMA2_Stream2_IRQHandler [WEAK] + EXPORT DMA2_Stream3_IRQHandler [WEAK] + EXPORT DMA2_Stream4_IRQHandler [WEAK] + EXPORT OTG_FS_IRQHandler [WEAK] + EXPORT DMA2_Stream5_IRQHandler [WEAK] + EXPORT DMA2_Stream6_IRQHandler [WEAK] + EXPORT DMA2_Stream7_IRQHandler [WEAK] + EXPORT USART6_IRQHandler [WEAK] + EXPORT I2C3_EV_IRQHandler [WEAK] + EXPORT I2C3_ER_IRQHandler [WEAK] + EXPORT FPU_IRQHandler [WEAK] + EXPORT SPI4_IRQHandler [WEAK] + EXPORT SPI5_IRQHandler [WEAK] + +WWDG_IRQHandler +PVD_IRQHandler +TAMP_STAMP_IRQHandler +RTC_WKUP_IRQHandler +FLASH_IRQHandler +RCC_IRQHandler +EXTI0_IRQHandler +EXTI1_IRQHandler +EXTI2_IRQHandler +EXTI3_IRQHandler +EXTI4_IRQHandler +DMA1_Stream0_IRQHandler +DMA1_Stream1_IRQHandler +DMA1_Stream2_IRQHandler +DMA1_Stream3_IRQHandler +DMA1_Stream4_IRQHandler +DMA1_Stream5_IRQHandler +DMA1_Stream6_IRQHandler +ADC_IRQHandler +EXTI9_5_IRQHandler +TIM1_BRK_TIM9_IRQHandler +TIM1_UP_TIM10_IRQHandler +TIM1_TRG_COM_TIM11_IRQHandler +TIM1_CC_IRQHandler +TIM2_IRQHandler +TIM3_IRQHandler +TIM4_IRQHandler +I2C1_EV_IRQHandler +I2C1_ER_IRQHandler +I2C2_EV_IRQHandler +I2C2_ER_IRQHandler +SPI1_IRQHandler +SPI2_IRQHandler +USART1_IRQHandler +USART2_IRQHandler +EXTI15_10_IRQHandler +RTC_Alarm_IRQHandler +OTG_FS_WKUP_IRQHandler +DMA1_Stream7_IRQHandler +SDIO_IRQHandler +TIM5_IRQHandler +SPI3_IRQHandler +DMA2_Stream0_IRQHandler +DMA2_Stream1_IRQHandler +DMA2_Stream2_IRQHandler +DMA2_Stream3_IRQHandler +DMA2_Stream4_IRQHandler +OTG_FS_IRQHandler +DMA2_Stream5_IRQHandler +DMA2_Stream6_IRQHandler +DMA2_Stream7_IRQHandler +USART6_IRQHandler +I2C3_EV_IRQHandler +I2C3_ER_IRQHandler +FPU_IRQHandler +SPI4_IRQHandler +SPI5_IRQHandler + + B . + + ENDP + + ALIGN + +;******************************************************************************* +; User Stack and Heap initialization +;******************************************************************************* + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap + +__user_initial_stackheap + + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + + ALIGN + + ENDIF + + END + +;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE***** diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/STM32F411RETx/system_stm32f4xx.c b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/STM32F411RETx/system_stm32f4xx.c new file mode 100644 index 0000000..ab23b9a --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/Device/STM32F411RETx/system_stm32f4xx.c @@ -0,0 +1,763 @@ +/** + ****************************************************************************** + * @file system_stm32f4xx.c + * @author MCD Application Team + * @version V2.6.0 + * @date 04-November-2016 + * @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File. + * + * This file provides two functions and one global variable to be called from + * user application: + * - SystemInit(): This function is called at startup just after reset and + * before branch to main program. This call is made inside + * the "startup_stm32f4xx.s" file. + * + * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used + * by the user application to setup the SysTick + * timer or configure other parameters. + * + * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must + * be called whenever the core clock is changed + * during program execution. + * + * + ****************************************************************************** + * @attention + * + *

© COPYRIGHT 2016 STMicroelectronics

+ * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/** @addtogroup CMSIS + * @{ + */ + +/** @addtogroup stm32f4xx_system + * @{ + */ + +/** @addtogroup STM32F4xx_System_Private_Includes + * @{ + */ + + +#include "stm32f4xx.h" + +#if !defined (HSE_VALUE) + #define HSE_VALUE ((uint32_t)25000000) /*!< Default value of the External oscillator in Hz */ +#endif /* HSE_VALUE */ + +#if !defined (HSI_VALUE) + #define HSI_VALUE ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/ +#endif /* HSI_VALUE */ + +/** + * @} + */ + +/** @addtogroup STM32F4xx_System_Private_TypesDefinitions + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32F4xx_System_Private_Defines + * @{ + */ + +/************************* Miscellaneous Configuration ************************/ +/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */ +#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\ + || defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\ + || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) +/* #define DATA_IN_ExtSRAM */ +#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx ||\ + STM32F412Zx || STM32F412Vx */ + +#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\ + || defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) +/* #define DATA_IN_ExtSDRAM */ +#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx ||\ + STM32F479xx */ + +/*!< Uncomment the following line if you need to relocate your vector Table in + Internal SRAM. */ +/* #define VECT_TAB_SRAM */ +#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field. + This value must be a multiple of 0x200. */ +/******************************************************************************/ + +/** + * @} + */ + +/** @addtogroup STM32F4xx_System_Private_Macros + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32F4xx_System_Private_Variables + * @{ + */ + /* This variable is updated in three ways: + 1) by calling CMSIS function SystemCoreClockUpdate() + 2) by calling HAL API function HAL_RCC_GetHCLKFreq() + 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency + Note: If you use this function to configure the system clock; then there + is no need to call the 2 first functions listed above, since SystemCoreClock + variable is updated automatically. + */ +uint32_t SystemCoreClock = 16000000; +const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; +const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4}; +/** + * @} + */ + +/** @addtogroup STM32F4xx_System_Private_FunctionPrototypes + * @{ + */ + +#if defined (DATA_IN_ExtSRAM) || defined (DATA_IN_ExtSDRAM) + static void SystemInit_ExtMemCtl(void); +#endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */ + +/** + * @} + */ + +/** @addtogroup STM32F4xx_System_Private_Functions + * @{ + */ + +/** + * @brief Setup the microcontroller system + * Initialize the FPU setting, vector table location and External memory + * configuration. + * @param None + * @retval None + */ +void SystemInit(void) +{ + /* FPU settings ------------------------------------------------------------*/ + #if (__FPU_PRESENT == 1) && (__FPU_USED == 1) + SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */ + #endif + /* Reset the RCC clock configuration to the default reset state ------------*/ + /* Set HSION bit */ + RCC->CR |= (uint32_t)0x00000001; + + /* Reset CFGR register */ + RCC->CFGR = 0x00000000; + + /* Reset HSEON, CSSON and PLLON bits */ + RCC->CR &= (uint32_t)0xFEF6FFFF; + + /* Reset PLLCFGR register */ + RCC->PLLCFGR = 0x24003010; + + /* Reset HSEBYP bit */ + RCC->CR &= (uint32_t)0xFFFBFFFF; + + /* Disable all interrupts */ + RCC->CIR = 0x00000000; + +#if defined (DATA_IN_ExtSRAM) || defined (DATA_IN_ExtSDRAM) + SystemInit_ExtMemCtl(); +#endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */ + + /* Configure the Vector Table location add offset address ------------------*/ +#ifdef VECT_TAB_SRAM + SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ +#else + SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ +#endif +} + +/** + * @brief Update SystemCoreClock variable according to Clock Register Values. + * The SystemCoreClock variable contains the core clock (HCLK), it can + * be used by the user application to setup the SysTick timer or configure + * other parameters. + * + * @note Each time the core clock (HCLK) changes, this function must be called + * to update SystemCoreClock variable value. Otherwise, any configuration + * based on this variable will be incorrect. + * + * @note - The system frequency computed by this function is not the real + * frequency in the chip. It is calculated based on the predefined + * constant and the selected clock source: + * + * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) + * + * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) + * + * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) + * or HSI_VALUE(*) multiplied/divided by the PLL factors. + * + * (*) HSI_VALUE is a constant defined in stm32f4xx_hal_conf.h file (default value + * 16 MHz) but the real value may vary depending on the variations + * in voltage and temperature. + * + * (**) HSE_VALUE is a constant defined in stm32f4xx_hal_conf.h file (its value + * depends on the application requirements), user has to ensure that HSE_VALUE + * is same as the real frequency of the crystal used. Otherwise, this function + * may have wrong result. + * + * - The result of this function could be not correct when using fractional + * value for HSE crystal. + * + * @param None + * @retval None + */ +void SystemCoreClockUpdate(void) +{ + uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; + + /* Get SYSCLK source -------------------------------------------------------*/ + tmp = RCC->CFGR & RCC_CFGR_SWS; + + switch (tmp) + { + case 0x00: /* HSI used as system clock source */ + SystemCoreClock = HSI_VALUE; + break; + case 0x04: /* HSE used as system clock source */ + SystemCoreClock = HSE_VALUE; + break; + case 0x08: /* PLL used as system clock source */ + + /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N + SYSCLK = PLL_VCO / PLL_P + */ + pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; + pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; + + if (pllsource != 0) + { + /* HSE used as PLL clock source */ + pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); + } + else + { + /* HSI used as PLL clock source */ + pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); + } + + pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; + SystemCoreClock = pllvco/pllp; + break; + default: + SystemCoreClock = HSI_VALUE; + break; + } + /* Compute HCLK frequency --------------------------------------------------*/ + /* Get HCLK prescaler */ + tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; + /* HCLK frequency */ + SystemCoreClock >>= tmp; +} + +#if defined (DATA_IN_ExtSRAM) && defined (DATA_IN_ExtSDRAM) +#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\ + || defined(STM32F469xx) || defined(STM32F479xx) +/** + * @brief Setup the external memory controller. + * Called in startup_stm32f4xx.s before jump to main. + * This function configures the external memories (SRAM/SDRAM) + * This SRAM/SDRAM will be used as program data memory (including heap and stack). + * @param None + * @retval None + */ +void SystemInit_ExtMemCtl(void) +{ + __IO uint32_t tmp = 0x00; + + register uint32_t tmpreg = 0, timeout = 0xFFFF; + register __IO uint32_t index; + + /* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */ + RCC->AHB1ENR |= 0x000001F8; + + /* Delay after an RCC peripheral clock enabling */ + tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOCEN); + + /* Connect PDx pins to FMC Alternate function */ + GPIOD->AFR[0] = 0x00CCC0CC; + GPIOD->AFR[1] = 0xCCCCCCCC; + /* Configure PDx pins in Alternate function mode */ + GPIOD->MODER = 0xAAAA0A8A; + /* Configure PDx pins speed to 100 MHz */ + GPIOD->OSPEEDR = 0xFFFF0FCF; + /* Configure PDx pins Output type to push-pull */ + GPIOD->OTYPER = 0x00000000; + /* No pull-up, pull-down for PDx pins */ + GPIOD->PUPDR = 0x00000000; + + /* Connect PEx pins to FMC Alternate function */ + GPIOE->AFR[0] = 0xC00CC0CC; + GPIOE->AFR[1] = 0xCCCCCCCC; + /* Configure PEx pins in Alternate function mode */ + GPIOE->MODER = 0xAAAA828A; + /* Configure PEx pins speed to 100 MHz */ + GPIOE->OSPEEDR = 0xFFFFC3CF; + /* Configure PEx pins Output type to push-pull */ + GPIOE->OTYPER = 0x00000000; + /* No pull-up, pull-down for PEx pins */ + GPIOE->PUPDR = 0x00000000; + + /* Connect PFx pins to FMC Alternate function */ + GPIOF->AFR[0] = 0xCCCCCCCC; + GPIOF->AFR[1] = 0xCCCCCCCC; + /* Configure PFx pins in Alternate function mode */ + GPIOF->MODER = 0xAA800AAA; + /* Configure PFx pins speed to 50 MHz */ + GPIOF->OSPEEDR = 0xAA800AAA; + /* Configure PFx pins Output type to push-pull */ + GPIOF->OTYPER = 0x00000000; + /* No pull-up, pull-down for PFx pins */ + GPIOF->PUPDR = 0x00000000; + + /* Connect PGx pins to FMC Alternate function */ + GPIOG->AFR[0] = 0xCCCCCCCC; + GPIOG->AFR[1] = 0xCCCCCCCC; + /* Configure PGx pins in Alternate function mode */ + GPIOG->MODER = 0xAAAAAAAA; + /* Configure PGx pins speed to 50 MHz */ + GPIOG->OSPEEDR = 0xAAAAAAAA; + /* Configure PGx pins Output type to push-pull */ + GPIOG->OTYPER = 0x00000000; + /* No pull-up, pull-down for PGx pins */ + GPIOG->PUPDR = 0x00000000; + + /* Connect PHx pins to FMC Alternate function */ + GPIOH->AFR[0] = 0x00C0CC00; + GPIOH->AFR[1] = 0xCCCCCCCC; + /* Configure PHx pins in Alternate function mode */ + GPIOH->MODER = 0xAAAA08A0; + /* Configure PHx pins speed to 50 MHz */ + GPIOH->OSPEEDR = 0xAAAA08A0; + /* Configure PHx pins Output type to push-pull */ + GPIOH->OTYPER = 0x00000000; + /* No pull-up, pull-down for PHx pins */ + GPIOH->PUPDR = 0x00000000; + + /* Connect PIx pins to FMC Alternate function */ + GPIOI->AFR[0] = 0xCCCCCCCC; + GPIOI->AFR[1] = 0x00000CC0; + /* Configure PIx pins in Alternate function mode */ + GPIOI->MODER = 0x0028AAAA; + /* Configure PIx pins speed to 50 MHz */ + GPIOI->OSPEEDR = 0x0028AAAA; + /* Configure PIx pins Output type to push-pull */ + GPIOI->OTYPER = 0x00000000; + /* No pull-up, pull-down for PIx pins */ + GPIOI->PUPDR = 0x00000000; + +/*-- FMC Configuration -------------------------------------------------------*/ + /* Enable the FMC interface clock */ + RCC->AHB3ENR |= 0x00000001; + /* Delay after an RCC peripheral clock enabling */ + tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN); + + FMC_Bank5_6->SDCR[0] = 0x000019E4; + FMC_Bank5_6->SDTR[0] = 0x01115351; + + /* SDRAM initialization sequence */ + /* Clock enable command */ + FMC_Bank5_6->SDCMR = 0x00000011; + tmpreg = FMC_Bank5_6->SDSR & 0x00000020; + while((tmpreg != 0) && (timeout-- > 0)) + { + tmpreg = FMC_Bank5_6->SDSR & 0x00000020; + } + + /* Delay */ + for (index = 0; index<1000; index++); + + /* PALL command */ + FMC_Bank5_6->SDCMR = 0x00000012; + timeout = 0xFFFF; + while((tmpreg != 0) && (timeout-- > 0)) + { + tmpreg = FMC_Bank5_6->SDSR & 0x00000020; + } + + /* Auto refresh command */ + FMC_Bank5_6->SDCMR = 0x00000073; + timeout = 0xFFFF; + while((tmpreg != 0) && (timeout-- > 0)) + { + tmpreg = FMC_Bank5_6->SDSR & 0x00000020; + } + + /* MRD register program */ + FMC_Bank5_6->SDCMR = 0x00046014; + timeout = 0xFFFF; + while((tmpreg != 0) && (timeout-- > 0)) + { + tmpreg = FMC_Bank5_6->SDSR & 0x00000020; + } + + /* Set refresh count */ + tmpreg = FMC_Bank5_6->SDRTR; + FMC_Bank5_6->SDRTR = (tmpreg | (0x0000027C<<1)); + + /* Disable write protection */ + tmpreg = FMC_Bank5_6->SDCR[0]; + FMC_Bank5_6->SDCR[0] = (tmpreg & 0xFFFFFDFF); + +#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) + /* Configure and enable Bank1_SRAM2 */ + FMC_Bank1->BTCR[2] = 0x00001011; + FMC_Bank1->BTCR[3] = 0x00000201; + FMC_Bank1E->BWTR[2] = 0x0fffffff; +#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */ +#if defined(STM32F469xx) || defined(STM32F479xx) + /* Configure and enable Bank1_SRAM2 */ + FMC_Bank1->BTCR[2] = 0x00001091; + FMC_Bank1->BTCR[3] = 0x00110212; + FMC_Bank1E->BWTR[2] = 0x0fffffff; +#endif /* STM32F469xx || STM32F479xx */ + + (void)(tmp); +} +#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */ +#elif defined (DATA_IN_ExtSRAM) || defined (DATA_IN_ExtSDRAM) +/** + * @brief Setup the external memory controller. + * Called in startup_stm32f4xx.s before jump to main. + * This function configures the external memories (SRAM/SDRAM) + * This SRAM/SDRAM will be used as program data memory (including heap and stack). + * @param None + * @retval None + */ +void SystemInit_ExtMemCtl(void) +{ + __IO uint32_t tmp = 0x00; +#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\ + || defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) +#if defined (DATA_IN_ExtSDRAM) + register uint32_t tmpreg = 0, timeout = 0xFFFF; + register __IO uint32_t index; + +#if defined(STM32F446xx) + /* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface + clock */ + RCC->AHB1ENR |= 0x0000007D; +#else + /* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface + clock */ + RCC->AHB1ENR |= 0x000001F8; +#endif /* STM32F446xx */ + /* Delay after an RCC peripheral clock enabling */ + tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOCEN); + +#if defined(STM32F446xx) + /* Connect PAx pins to FMC Alternate function */ + GPIOA->AFR[0] |= 0xC0000000; + GPIOA->AFR[1] |= 0x00000000; + /* Configure PDx pins in Alternate function mode */ + GPIOA->MODER |= 0x00008000; + /* Configure PDx pins speed to 50 MHz */ + GPIOA->OSPEEDR |= 0x00008000; + /* Configure PDx pins Output type to push-pull */ + GPIOA->OTYPER |= 0x00000000; + /* No pull-up, pull-down for PDx pins */ + GPIOA->PUPDR |= 0x00000000; + + /* Connect PCx pins to FMC Alternate function */ + GPIOC->AFR[0] |= 0x00CC0000; + GPIOC->AFR[1] |= 0x00000000; + /* Configure PDx pins in Alternate function mode */ + GPIOC->MODER |= 0x00000A00; + /* Configure PDx pins speed to 50 MHz */ + GPIOC->OSPEEDR |= 0x00000A00; + /* Configure PDx pins Output type to push-pull */ + GPIOC->OTYPER |= 0x00000000; + /* No pull-up, pull-down for PDx pins */ + GPIOC->PUPDR |= 0x00000000; +#endif /* STM32F446xx */ + + /* Connect PDx pins to FMC Alternate function */ + GPIOD->AFR[0] = 0x000000CC; + GPIOD->AFR[1] = 0xCC000CCC; + /* Configure PDx pins in Alternate function mode */ + GPIOD->MODER = 0xA02A000A; + /* Configure PDx pins speed to 50 MHz */ + GPIOD->OSPEEDR = 0xA02A000A; + /* Configure PDx pins Output type to push-pull */ + GPIOD->OTYPER = 0x00000000; + /* No pull-up, pull-down for PDx pins */ + GPIOD->PUPDR = 0x00000000; + + /* Connect PEx pins to FMC Alternate function */ + GPIOE->AFR[0] = 0xC00000CC; + GPIOE->AFR[1] = 0xCCCCCCCC; + /* Configure PEx pins in Alternate function mode */ + GPIOE->MODER = 0xAAAA800A; + /* Configure PEx pins speed to 50 MHz */ + GPIOE->OSPEEDR = 0xAAAA800A; + /* Configure PEx pins Output type to push-pull */ + GPIOE->OTYPER = 0x00000000; + /* No pull-up, pull-down for PEx pins */ + GPIOE->PUPDR = 0x00000000; + + /* Connect PFx pins to FMC Alternate function */ + GPIOF->AFR[0] = 0xCCCCCCCC; + GPIOF->AFR[1] = 0xCCCCCCCC; + /* Configure PFx pins in Alternate function mode */ + GPIOF->MODER = 0xAA800AAA; + /* Configure PFx pins speed to 50 MHz */ + GPIOF->OSPEEDR = 0xAA800AAA; + /* Configure PFx pins Output type to push-pull */ + GPIOF->OTYPER = 0x00000000; + /* No pull-up, pull-down for PFx pins */ + GPIOF->PUPDR = 0x00000000; + + /* Connect PGx pins to FMC Alternate function */ + GPIOG->AFR[0] = 0xCCCCCCCC; + GPIOG->AFR[1] = 0xCCCCCCCC; + /* Configure PGx pins in Alternate function mode */ + GPIOG->MODER = 0xAAAAAAAA; + /* Configure PGx pins speed to 50 MHz */ + GPIOG->OSPEEDR = 0xAAAAAAAA; + /* Configure PGx pins Output type to push-pull */ + GPIOG->OTYPER = 0x00000000; + /* No pull-up, pull-down for PGx pins */ + GPIOG->PUPDR = 0x00000000; + +#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\ + || defined(STM32F469xx) || defined(STM32F479xx) + /* Connect PHx pins to FMC Alternate function */ + GPIOH->AFR[0] = 0x00C0CC00; + GPIOH->AFR[1] = 0xCCCCCCCC; + /* Configure PHx pins in Alternate function mode */ + GPIOH->MODER = 0xAAAA08A0; + /* Configure PHx pins speed to 50 MHz */ + GPIOH->OSPEEDR = 0xAAAA08A0; + /* Configure PHx pins Output type to push-pull */ + GPIOH->OTYPER = 0x00000000; + /* No pull-up, pull-down for PHx pins */ + GPIOH->PUPDR = 0x00000000; + + /* Connect PIx pins to FMC Alternate function */ + GPIOI->AFR[0] = 0xCCCCCCCC; + GPIOI->AFR[1] = 0x00000CC0; + /* Configure PIx pins in Alternate function mode */ + GPIOI->MODER = 0x0028AAAA; + /* Configure PIx pins speed to 50 MHz */ + GPIOI->OSPEEDR = 0x0028AAAA; + /* Configure PIx pins Output type to push-pull */ + GPIOI->OTYPER = 0x00000000; + /* No pull-up, pull-down for PIx pins */ + GPIOI->PUPDR = 0x00000000; +#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */ + +/*-- FMC Configuration -------------------------------------------------------*/ + /* Enable the FMC interface clock */ + RCC->AHB3ENR |= 0x00000001; + /* Delay after an RCC peripheral clock enabling */ + tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN); + + /* Configure and enable SDRAM bank1 */ +#if defined(STM32F446xx) + FMC_Bank5_6->SDCR[0] = 0x00001954; +#else + FMC_Bank5_6->SDCR[0] = 0x000019E4; +#endif /* STM32F446xx */ + FMC_Bank5_6->SDTR[0] = 0x01115351; + + /* SDRAM initialization sequence */ + /* Clock enable command */ + FMC_Bank5_6->SDCMR = 0x00000011; + tmpreg = FMC_Bank5_6->SDSR & 0x00000020; + while((tmpreg != 0) && (timeout-- > 0)) + { + tmpreg = FMC_Bank5_6->SDSR & 0x00000020; + } + + /* Delay */ + for (index = 0; index<1000; index++); + + /* PALL command */ + FMC_Bank5_6->SDCMR = 0x00000012; + timeout = 0xFFFF; + while((tmpreg != 0) && (timeout-- > 0)) + { + tmpreg = FMC_Bank5_6->SDSR & 0x00000020; + } + + /* Auto refresh command */ +#if defined(STM32F446xx) + FMC_Bank5_6->SDCMR = 0x000000F3; +#else + FMC_Bank5_6->SDCMR = 0x00000073; +#endif /* STM32F446xx */ + timeout = 0xFFFF; + while((tmpreg != 0) && (timeout-- > 0)) + { + tmpreg = FMC_Bank5_6->SDSR & 0x00000020; + } + + /* MRD register program */ +#if defined(STM32F446xx) + FMC_Bank5_6->SDCMR = 0x00044014; +#else + FMC_Bank5_6->SDCMR = 0x00046014; +#endif /* STM32F446xx */ + timeout = 0xFFFF; + while((tmpreg != 0) && (timeout-- > 0)) + { + tmpreg = FMC_Bank5_6->SDSR & 0x00000020; + } + + /* Set refresh count */ + tmpreg = FMC_Bank5_6->SDRTR; +#if defined(STM32F446xx) + FMC_Bank5_6->SDRTR = (tmpreg | (0x0000050C<<1)); +#else + FMC_Bank5_6->SDRTR = (tmpreg | (0x0000027C<<1)); +#endif /* STM32F446xx */ + + /* Disable write protection */ + tmpreg = FMC_Bank5_6->SDCR[0]; + FMC_Bank5_6->SDCR[0] = (tmpreg & 0xFFFFFDFF); +#endif /* DATA_IN_ExtSDRAM */ +#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || STM32F479xx */ + +#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\ + || defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\ + || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) + +#if defined(DATA_IN_ExtSRAM) +/*-- GPIOs Configuration -----------------------------------------------------*/ + /* Enable GPIOD, GPIOE, GPIOF and GPIOG interface clock */ + RCC->AHB1ENR |= 0x00000078; + /* Delay after an RCC peripheral clock enabling */ + tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIODEN); + + /* Connect PDx pins to FMC Alternate function */ + GPIOD->AFR[0] = 0x00CCC0CC; + GPIOD->AFR[1] = 0xCCCCCCCC; + /* Configure PDx pins in Alternate function mode */ + GPIOD->MODER = 0xAAAA0A8A; + /* Configure PDx pins speed to 100 MHz */ + GPIOD->OSPEEDR = 0xFFFF0FCF; + /* Configure PDx pins Output type to push-pull */ + GPIOD->OTYPER = 0x00000000; + /* No pull-up, pull-down for PDx pins */ + GPIOD->PUPDR = 0x00000000; + + /* Connect PEx pins to FMC Alternate function */ + GPIOE->AFR[0] = 0xC00CC0CC; + GPIOE->AFR[1] = 0xCCCCCCCC; + /* Configure PEx pins in Alternate function mode */ + GPIOE->MODER = 0xAAAA828A; + /* Configure PEx pins speed to 100 MHz */ + GPIOE->OSPEEDR = 0xFFFFC3CF; + /* Configure PEx pins Output type to push-pull */ + GPIOE->OTYPER = 0x00000000; + /* No pull-up, pull-down for PEx pins */ + GPIOE->PUPDR = 0x00000000; + + /* Connect PFx pins to FMC Alternate function */ + GPIOF->AFR[0] = 0x00CCCCCC; + GPIOF->AFR[1] = 0xCCCC0000; + /* Configure PFx pins in Alternate function mode */ + GPIOF->MODER = 0xAA000AAA; + /* Configure PFx pins speed to 100 MHz */ + GPIOF->OSPEEDR = 0xFF000FFF; + /* Configure PFx pins Output type to push-pull */ + GPIOF->OTYPER = 0x00000000; + /* No pull-up, pull-down for PFx pins */ + GPIOF->PUPDR = 0x00000000; + + /* Connect PGx pins to FMC Alternate function */ + GPIOG->AFR[0] = 0x00CCCCCC; + GPIOG->AFR[1] = 0x000000C0; + /* Configure PGx pins in Alternate function mode */ + GPIOG->MODER = 0x00085AAA; + /* Configure PGx pins speed to 100 MHz */ + GPIOG->OSPEEDR = 0x000CAFFF; + /* Configure PGx pins Output type to push-pull */ + GPIOG->OTYPER = 0x00000000; + /* No pull-up, pull-down for PGx pins */ + GPIOG->PUPDR = 0x00000000; + +/*-- FMC/FSMC Configuration --------------------------------------------------*/ + /* Enable the FMC/FSMC interface clock */ + RCC->AHB3ENR |= 0x00000001; + +#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) + /* Delay after an RCC peripheral clock enabling */ + tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN); + /* Configure and enable Bank1_SRAM2 */ + FMC_Bank1->BTCR[2] = 0x00001011; + FMC_Bank1->BTCR[3] = 0x00000201; + FMC_Bank1E->BWTR[2] = 0x0fffffff; +#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */ +#if defined(STM32F469xx) || defined(STM32F479xx) + /* Delay after an RCC peripheral clock enabling */ + tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN); + /* Configure and enable Bank1_SRAM2 */ + FMC_Bank1->BTCR[2] = 0x00001091; + FMC_Bank1->BTCR[3] = 0x00110212; + FMC_Bank1E->BWTR[2] = 0x0fffffff; +#endif /* STM32F469xx || STM32F479xx */ +#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)\ + || defined(STM32F412Zx) || defined(STM32F412Vx) + /* Delay after an RCC peripheral clock enabling */ + tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN); + /* Configure and enable Bank1_SRAM2 */ + FSMC_Bank1->BTCR[2] = 0x00001011; + FSMC_Bank1->BTCR[3] = 0x00000201; + FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF; +#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F412Zx || STM32F412Vx */ + +#endif /* DATA_IN_ExtSRAM */ +#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\ + STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx */ + (void)(tmp); +} +#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */ +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/_ARMCM0/RTE_Components.h b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/_ARMCM0/RTE_Components.h new file mode 100644 index 0000000..bf1d6d1 --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/_ARMCM0/RTE_Components.h @@ -0,0 +1,20 @@ + +/* + * Auto generated Run-Time-Environment Component Configuration File + * *** Do not modify ! *** + * + * Project: 'arm_nnexamples_cifar10' + * Target: 'ARMCM0' + */ + +#ifndef RTE_COMPONENTS_H +#define RTE_COMPONENTS_H + + +/* + * Define the Device Header File: + */ +#define CMSIS_device_header "ARMCM0.h" + + +#endif /* RTE_COMPONENTS_H */ diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/_ARMCM3/RTE_Components.h b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/_ARMCM3/RTE_Components.h new file mode 100644 index 0000000..6993e2a --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/_ARMCM3/RTE_Components.h @@ -0,0 +1,26 @@ + +/* + * Auto generated Run-Time-Environment Component Configuration File + * *** Do not modify ! *** + * + * Project: 'arm_nnexamples_nn_test' + * Target: 'ARMCM3' + */ + +#ifndef RTE_COMPONENTS_H +#define RTE_COMPONENTS_H + + +/* + * Define the Device Header File: + */ +#define CMSIS_device_header "ARMCM3.h" + +#define RTE_Compiler_IO_STDERR /* Compiler I/O: STDERR */ + #define RTE_Compiler_IO_STDERR_ITM /* Compiler I/O: STDERR ITM */ +#define RTE_Compiler_IO_STDOUT /* Compiler I/O: STDOUT */ + #define RTE_Compiler_IO_STDOUT_ITM /* Compiler I/O: STDOUT ITM */ +#define RTE_Compiler_IO_TTY /* Compiler I/O: TTY */ + #define RTE_Compiler_IO_TTY_ITM /* Compiler I/O: TTY ITM */ + +#endif /* RTE_COMPONENTS_H */ diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/_ARMCM4_FP/RTE_Components.h b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/_ARMCM4_FP/RTE_Components.h new file mode 100644 index 0000000..374579e --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/_ARMCM4_FP/RTE_Components.h @@ -0,0 +1,26 @@ + +/* + * Auto generated Run-Time-Environment Component Configuration File + * *** Do not modify ! *** + * + * Project: 'arm_nnexamples_nn_test' + * Target: 'ARMCM4_FP' + */ + +#ifndef RTE_COMPONENTS_H +#define RTE_COMPONENTS_H + + +/* + * Define the Device Header File: + */ +#define CMSIS_device_header "ARMCM4_FP.h" + +#define RTE_Compiler_IO_STDERR /* Compiler I/O: STDERR */ + #define RTE_Compiler_IO_STDERR_ITM /* Compiler I/O: STDERR ITM */ +#define RTE_Compiler_IO_STDOUT /* Compiler I/O: STDOUT */ + #define RTE_Compiler_IO_STDOUT_ITM /* Compiler I/O: STDOUT ITM */ +#define RTE_Compiler_IO_TTY /* Compiler I/O: TTY */ + #define RTE_Compiler_IO_TTY_ITM /* Compiler I/O: TTY ITM */ + +#endif /* RTE_COMPONENTS_H */ diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/_ARMCM7_SP/RTE_Components.h b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/_ARMCM7_SP/RTE_Components.h new file mode 100644 index 0000000..40dfc78 --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/_ARMCM7_SP/RTE_Components.h @@ -0,0 +1,26 @@ + +/* + * Auto generated Run-Time-Environment Component Configuration File + * *** Do not modify ! *** + * + * Project: 'arm_nnexamples_nn_test' + * Target: 'ARMCM7_SP' + */ + +#ifndef RTE_COMPONENTS_H +#define RTE_COMPONENTS_H + + +/* + * Define the Device Header File: + */ +#define CMSIS_device_header "ARMCM7_SP.h" + +#define RTE_Compiler_IO_STDERR /* Compiler I/O: STDERR */ + #define RTE_Compiler_IO_STDERR_ITM /* Compiler I/O: STDERR ITM */ +#define RTE_Compiler_IO_STDOUT /* Compiler I/O: STDOUT */ + #define RTE_Compiler_IO_STDOUT_ITM /* Compiler I/O: STDOUT ITM */ +#define RTE_Compiler_IO_TTY /* Compiler I/O: TTY */ + #define RTE_Compiler_IO_TTY_ITM /* Compiler I/O: TTY ITM */ + +#endif /* RTE_COMPONENTS_H */ diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_convolve_HWC_q15_ref.c b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_convolve_HWC_q15_ref.c new file mode 100644 index 0000000..4aa6077 --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_convolve_HWC_q15_ref.c @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2010-2018 Arm Limited or its affiliates. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ref_functions.h" + +void arm_convolve_HWC_q15_ref(const q15_t * Im_in, // input image + const uint16_t dim_im_in, // input image dimention + const uint16_t ch_im_in, // number of input image channels + const q15_t * wt, // kernel weights + const uint16_t ch_im_out, // number of filters, i.e., output image channels + const uint16_t dim_kernel, // filter kernel size + const uint16_t padding, // padding sizes + const uint16_t stride, // stride + const q15_t * bias, // bias + const uint16_t bias_shift, const uint16_t out_shift, q15_t * Im_out, // output image + const uint16_t dim_im_out, // output image dimension + q15_t * bufferA, //buffer space for input + q7_t * bufferB //buffer space for output + ) +{ + int i, j, k, l, m, n; + int conv_out; + int in_row, in_col; + + for (i = 0; i < ch_im_out; i++) + { + for (j = 0; j < dim_im_out; j++) + { + for (k = 0; k < dim_im_out; k++) + { +#ifndef ARM_NN_TRUNCATE + conv_out = (bias[i] << bias_shift) + (0x1 << (out_shift - 1)); +#else + conv_out = bias[i] << bias_shift; +#endif + for (m = 0; m < dim_kernel; m++) + { + for (n = 0; n < dim_kernel; n++) + { + in_row = stride * j + m - padding; + in_col = stride * k + n - padding; + if (in_row >= 0 && in_col >= 0 && in_row < dim_im_in && in_col < dim_im_in) + { + for (l = 0; l < ch_im_in; l++) + { + conv_out += Im_in[(in_row * dim_im_in + in_col) * ch_im_in + l] * + wt[i * ch_im_in * dim_kernel * dim_kernel + (m * dim_kernel + n) * ch_im_in + l]; + } + } + } + } + Im_out[i + (j * dim_im_out + k) * ch_im_out] = (q15_t) __SSAT((conv_out >> out_shift), 16); + } + } + } +} diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_convolve_HWC_q15_ref_nonsquare.c b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_convolve_HWC_q15_ref_nonsquare.c new file mode 100644 index 0000000..69efcb2 --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_convolve_HWC_q15_ref_nonsquare.c @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2010-2018 Arm Limited or its affiliates. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ref_functions.h" + +void +arm_convolve_HWC_q15_nonsquare_ref(const q15_t * Im_in, + const uint16_t dim_im_in_x, + const uint16_t dim_im_in_y, + const uint16_t ch_im_in, + const q15_t * wt, + const uint16_t ch_im_out, + const uint16_t dim_kernel_x, + const uint16_t dim_kernel_y, + const uint16_t padding_x, + const uint16_t padding_y, + const uint16_t stride_x, + const uint16_t stride_y, + const q15_t * bias, + const uint16_t bias_shift, + const uint16_t out_shift, + q15_t * Im_out, + const uint16_t dim_im_out_x, + const uint16_t dim_im_out_y, + q15_t * bufferA, + q7_t * bufferB) + +{ + uint16_t i, j, k, l, m, n; + int conv_out; + signed char in_row, in_col; + + for (i = 0; i < ch_im_out; i++) + { + for (j = 0; j < dim_im_out_y; j++) + { + for (k = 0; k < dim_im_out_x; k++) + { +#ifndef ARM_NN_TRUNCATE + conv_out = (bias[i] << bias_shift) + (0x1 << (out_shift - 1)); +#else + conv_out = bias[i] << bias_shift; +#endif + for (m = 0; m < dim_kernel_y; m++) + { + for (n = 0; n < dim_kernel_x; n++) + { + in_row = stride_y * j + m - padding_y; + in_col = stride_x * k + n - padding_x; + if (in_row >= 0 && in_col >= 0 && in_row < dim_im_in_y && in_col < dim_im_in_x) + { + for (l = 0; l < ch_im_in; l++) + { + conv_out += + Im_in[(in_row * dim_im_in_x + in_col) * ch_im_in + + l] * wt[i * ch_im_in * dim_kernel_x * dim_kernel_y + (m * dim_kernel_x + + n) * ch_im_in + l]; + } + } + } + } + Im_out[i + (j * dim_im_out_x + k) * ch_im_out] = (q15_t) __SSAT((conv_out >> out_shift), 16); + } + } + } +} + + diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_convolve_HWC_q7_ref.c b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_convolve_HWC_q7_ref.c new file mode 100644 index 0000000..aaf25ba --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_convolve_HWC_q7_ref.c @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2010-2018 Arm Limited or its affiliates. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ref_functions.h" + +void arm_convolve_HWC_q7_ref(const q7_t * Im_in, // input image + const uint16_t dim_im_in, // input image dimention + const uint16_t ch_im_in, // number of input image channels + const q7_t * wt, // kernel weights + const uint16_t ch_im_out, // number of filters, i.e., output image channels + const uint16_t dim_kernel, // filter kernel size + const uint16_t padding, // padding sizes + const uint16_t stride, // stride + const q7_t * bias, // bias + const uint16_t bias_shift, const uint16_t out_shift, q7_t * Im_out, // output image + const uint16_t dim_im_out, // output image dimension + q15_t * bufferA, //buffer space for input + q7_t * bufferB //buffer space for output + ) +{ + int i, j, k, l, m, n; + int conv_out; + int in_row, in_col; + + for (i = 0; i < ch_im_out; i++) + { + for (j = 0; j < dim_im_out; j++) + { + for (k = 0; k < dim_im_out; k++) + { +#ifndef ARM_NN_TRUNCATE + conv_out = ((q31_t) (bias[i]) << bias_shift) + (0x1 << (out_shift - 1)); +#else + conv_out = bias[i] << bias_shift; +#endif + for (m = 0; m < dim_kernel; m++) + { + for (n = 0; n < dim_kernel; n++) + { + // if-for implementation + in_row = stride * j + m - padding; + in_col = stride * k + n - padding; + if (in_row >= 0 && in_col >= 0 && in_row < dim_im_in && in_col < dim_im_in) + { + for (l = 0; l < ch_im_in; l++) + { + conv_out += Im_in[(in_row * dim_im_in + in_col) * ch_im_in + l] * + wt[i * ch_im_in * dim_kernel * dim_kernel + (m * dim_kernel + n) * ch_im_in + l]; + } + } + } + } + Im_out[i + (j * dim_im_out + k) * ch_im_out] = (q7_t) __SSAT((conv_out >> out_shift), 8); + } + } + } +} diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_convolve_HWC_q7_ref_nonsquare.c b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_convolve_HWC_q7_ref_nonsquare.c new file mode 100644 index 0000000..e731d07 --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_convolve_HWC_q7_ref_nonsquare.c @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2010-2018 Arm Limited or its affiliates. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ref_functions.h" + +void arm_convolve_HWC_q7_ref_nonsquare(const q7_t * Im_in, // input image + const uint16_t dim_im_in_x, // input image dimention x + const uint16_t dim_im_in_y, // input image dimention y + const uint16_t ch_im_in, // number of input image channels + const q7_t * wt, // kernel weights + const uint16_t ch_im_out, // number of filters, i.e., output image channels + const uint16_t dim_kernel_x, // filter kernel size x + const uint16_t dim_kernel_y, // filter kernel size y + const uint16_t padding_x, // padding sizes x + const uint16_t padding_y, // padding sizes y + const uint16_t stride_x, // stride x + const uint16_t stride_y, // stride y + const q7_t * bias, // bias + const uint16_t bias_shift, const uint16_t out_shift, q7_t * Im_out, // output image + const uint16_t dim_im_out_x, // output image dimension x + const uint16_t dim_im_out_y, // output image dimension y + q15_t * bufferA, //buffer space for input + q7_t * bufferB //buffer space for output + ) +{ + int i, j, k, l, m, n; + int conv_out; + int in_row, in_col; + + for (i = 0; i < ch_im_out; i++) + { + for (j = 0; j < dim_im_out_y; j++) + { + for (k = 0; k < dim_im_out_x; k++) + { +#ifndef ARM_NN_TRUNCATE + conv_out = ((q31_t) (bias[i]) << bias_shift) + (0x1 << (out_shift - 1)); +#else + conv_out = bias[i] << bias_shift; +#endif + for (m = 0; m < dim_kernel_y; m++) + { + for (n = 0; n < dim_kernel_x; n++) + { + // if-for implementation + in_row = stride_y * j + m - padding_y; + in_col = stride_x * k + n - padding_x; + if (in_row >= 0 && in_col >= 0 && in_row < dim_im_in_y && in_col < dim_im_in_x) + { + for (l = 0; l < ch_im_in; l++) + { + conv_out += Im_in[(in_row * dim_im_in_x + in_col) * ch_im_in + l] * + wt[i * ch_im_in * dim_kernel_y * dim_kernel_x + (m * dim_kernel_x + n) * ch_im_in + + l]; + } + } + } + } + Im_out[i + (j * dim_im_out_x + k) * ch_im_out] = (q7_t) __SSAT((conv_out >> out_shift), 8); + } + } + } +} diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_depthwise_separable_conv_HWC_q7_ref.c b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_depthwise_separable_conv_HWC_q7_ref.c new file mode 100644 index 0000000..970effc --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_depthwise_separable_conv_HWC_q7_ref.c @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2010-2018 Arm Limited or its affiliates. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ref_functions.h" + +void arm_depthwise_separable_conv_HWC_q7_ref(const q7_t * Im_in, // input image + const uint16_t dim_im_in, // input image dimention + const uint16_t ch_im_in, // number of input image channels + const q7_t * wt, // kernel weights + const uint16_t ch_im_out, // number of filters, i.e., output image channels + const uint16_t dim_kernel, // filter kernel size + const uint16_t padding, // padding sizes + const uint16_t stride, // stride + const q7_t * bias, // bias + const uint16_t bias_shift, // amount of left-shift for bias + const uint16_t out_shift, // amount of right-shift for output + q7_t * Im_out, // output image + const uint16_t dim_im_out, // output image dimension + q15_t * bufferA, //buffer space for input + q7_t * bufferB //buffer space for output + ) +{ + int i_out_y, i_out_x, i_ch_out; + int i_ker_y, i_ker_x; + for (i_out_y = 0; i_out_y < dim_im_out; i_out_y++) + { + for (i_out_x = 0; i_out_x < dim_im_out; i_out_x++) + { + for (i_ch_out = 0; i_ch_out < ch_im_out; i_ch_out++) + { + // for each output +#ifndef ARM_NN_TRUNCATE + int conv_out = (bias[i_ch_out] << bias_shift) + (0x1 << (out_shift - 1)); +#else + int conv_out = bias[i_ch_out] << bias_shift; +#endif + for (i_ker_y = 0; i_ker_y < dim_kernel; i_ker_y++) + { + for (i_ker_x = 0; i_ker_x < dim_kernel; i_ker_x++) + { + int in_row = stride * i_out_y + i_ker_y - padding; + int in_col = stride * i_out_x + i_ker_x - padding; + if (in_row >= 0 && in_col >= 0 && in_row < dim_im_in && in_col < dim_im_in) + { + conv_out += Im_in[(in_row * dim_im_in + in_col) * ch_im_in + i_ch_out] * + wt[(i_ker_y * dim_kernel + i_ker_x) * ch_im_out + i_ch_out]; + } + } + } + Im_out[(i_out_y * dim_im_out + i_out_x) * ch_im_out + i_ch_out] = + (q7_t) __SSAT((conv_out >> out_shift), 8); + } + } + } +} diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_depthwise_separable_conv_HWC_q7_ref_nonsquare.c b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_depthwise_separable_conv_HWC_q7_ref_nonsquare.c new file mode 100644 index 0000000..8fa4147 --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_depthwise_separable_conv_HWC_q7_ref_nonsquare.c @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2010-2018 Arm Limited or its affiliates. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ref_functions.h" + +void arm_depthwise_separable_conv_HWC_q7_ref_nonsquare(const q7_t * Im_in, // input image + const uint16_t dim_im_in_x, // input image dimention x + const uint16_t dim_im_in_y, // input image dimention y + const uint16_t ch_im_in, // number of input image channels + const q7_t * wt, // kernel weights + const uint16_t ch_im_out, // number of filters, i.e., output image channels + const uint16_t dim_kernel_x, // filter kernel size x + const uint16_t dim_kernel_y, // filter kernel size y + const uint16_t padding_x, // padding sizes x + const uint16_t padding_y, // padding sizes y + const uint16_t stride_x, // stride x + const uint16_t stride_y, // stride y + const q7_t * bias, // bias + const uint16_t bias_shift, // amount of left-shift for bias + const uint16_t out_shift, // amount of right-shift for output + q7_t * Im_out, // output image + const uint16_t dim_im_out_x, // output image dimension x + const uint16_t dim_im_out_y, // output image dimension y + q15_t * bufferA, //buffer space for input + q7_t * bufferB //buffer space for output + ) +{ + int i_out_y, i_out_x, i_ch_out; + int i_ker_y, i_ker_x; + for (i_out_y = 0; i_out_y < dim_im_out_y; i_out_y++) + { + for (i_out_x = 0; i_out_x < dim_im_out_x; i_out_x++) + { + for (i_ch_out = 0; i_ch_out < ch_im_out; i_ch_out++) + { + // for each output +#ifndef ARM_NN_TRUNCATE + int conv_out = (bias[i_ch_out] << bias_shift) + (0x1 << (out_shift - 1)); +#else + int conv_out = bias[i_ch_out] << bias_shift; +#endif + for (i_ker_y = 0; i_ker_y < dim_kernel_y; i_ker_y++) + { + for (i_ker_x = 0; i_ker_x < dim_kernel_x; i_ker_x++) + { + int in_row = stride_y * i_out_y + i_ker_y - padding_y; + int in_col = stride_x * i_out_x + i_ker_x - padding_x; + if (in_row >= 0 && in_col >= 0 && in_row < dim_im_in_y && in_col < dim_im_in_x) + { + conv_out += Im_in[(in_row * dim_im_in_x + in_col) * ch_im_in + i_ch_out] * + wt[(i_ker_y * dim_kernel_x + i_ker_x) * ch_im_out + i_ch_out]; + } + } + } + Im_out[(i_out_y * dim_im_out_x + i_out_x) * ch_im_out + i_ch_out] = + (q7_t) __SSAT((conv_out >> out_shift), 8); + } + } + } +} diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_mat_q7_vec_q15_opt_ref.c b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_mat_q7_vec_q15_opt_ref.c new file mode 100644 index 0000000..6fe5e2b --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_mat_q7_vec_q15_opt_ref.c @@ -0,0 +1,120 @@ +/* + * Copyright (C) 2010-2018 Arm Limited or its affiliates. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ref_functions.h" + +void arm_fully_connected_mat_q7_vec_q15_opt_ref(const q15_t * pV, // pointer to vector + const q7_t * pM, // pointer to matrix + const uint16_t dim_vec, // length of the vector + const uint16_t num_of_rows, // numCol of A + const uint16_t bias_shift, // amount of left-shift for bias + const uint16_t out_shift, // amount of right-shift for output + const q7_t * bias, q15_t * pOut, // output operand + q15_t * vec_buffer) +{ + + uint16_t rowCnt = num_of_rows >> 2; + const q7_t *pB = pM; + const q15_t *pA; + q15_t *pO = pOut; + const q7_t *pBias = bias; + + while (rowCnt) + { + pA = pV; +#ifndef ARM_NN_TRUNCATE + q31_t sum = (*pBias++ << bias_shift) + (0x1 << (out_shift - 1)); + q31_t sum2 = (*pBias++ << bias_shift) + (0x1 << (out_shift - 1)); + q31_t sum3 = (*pBias++ << bias_shift) + (0x1 << (out_shift - 1)); + q31_t sum4 = (*pBias++ << bias_shift) + (0x1 << (out_shift - 1)); +#else + q31_t sum = *pBias++ << bias_shift; + q31_t sum2 = *pBias++ << bias_shift; + q31_t sum3 = *pBias++ << bias_shift; + q31_t sum4 = *pBias++ << bias_shift; +#endif + + uint16_t colCnt = dim_vec >> 1; + + while (colCnt) + { + q15_t inA1 = *pA++; + q15_t inA2 = *pA++; + + q7_t inB1 = *pB++; + q7_t inB3 = *pB++; + q7_t inB2 = *pB++; + q7_t inB4 = *pB++; + + sum += inA1 * inB1 + inA2 * inB2; + sum2 += inA1 * inB3 + inA2 * inB4; + + inB1 = *pB++; + inB3 = *pB++; + inB2 = *pB++; + inB4 = *pB++; + + sum3 += inA1 * inB1 + inA2 * inB2; + sum4 += inA1 * inB3 + inA2 * inB4; + + colCnt--; + } + colCnt = dim_vec & 0x1; + while (colCnt) + { + q15_t inA = *pA++; + q7_t inB = *pB++; + sum += inA * inB; + inB = *pB++; + sum2 += inA * inB; + inB = *pB++; + sum3 += inA * inB; + inB = *pB++; + sum4 += inA * inB; + + colCnt--; + } + *pO++ = (q15_t) __SSAT((sum >> out_shift), 16); + *pO++ = (q15_t) __SSAT((sum2 >> out_shift), 16); + *pO++ = (q15_t) __SSAT((sum3 >> out_shift), 16); + *pO++ = (q15_t) __SSAT((sum4 >> out_shift), 16); + + rowCnt--; + } + + rowCnt = num_of_rows & 0x3; + + while (rowCnt) + { + pA = pV; +#ifndef ARM_NN_TRUNCATE + int ip_out = (*pBias++ << bias_shift) + (0x1 << (out_shift - 1)); +#else + int ip_out = *pBias++ << bias_shift; +#endif + for (int j = 0; j < dim_vec; j++) + { + q15_t inA = *pA++; + q7_t inB = *pB++; + ip_out += inA * inB; + } + *pO++ = (q15_t) __SSAT((ip_out >> out_shift), 16); + + rowCnt--; + } +} diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_mat_q7_vec_q15_ref.c b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_mat_q7_vec_q15_ref.c new file mode 100644 index 0000000..6a4d385 --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_mat_q7_vec_q15_ref.c @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2010-2018 Arm Limited or its affiliates. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ref_functions.h" + +void arm_fully_connected_mat_q7_vec_q15_ref(const q15_t * pV, // pointer to vector + const q7_t * pM, // pointer to matrix + const uint16_t dim_vec, // length of the vector + const uint16_t num_of_rows, // numCol of A + const uint16_t bias_shift, // amount of left-shift for bias + const uint16_t out_shift, // amount of right-shift for output + const q7_t * bias, q15_t * pOut, // output operand + q15_t * vec_buffer) +{ + for (int i = 0; i < num_of_rows; i++) + { +#ifndef ARM_NN_TRUNCATE + int ip_out = (bias[i] << bias_shift) + (0x1 << (out_shift - 1)); +#else + int ip_out = bias[i] << bias_shift; +#endif + for (int j = 0; j < dim_vec; j++) + { + ip_out += pV[j] * pM[i * dim_vec + j]; + } + pOut[i] = (q15_t) __SSAT((ip_out >> out_shift), 16); + } +} diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_q15_opt_ref.c b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_q15_opt_ref.c new file mode 100644 index 0000000..475c757 --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_q15_opt_ref.c @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2010-2018 Arm Limited or its affiliates. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ref_functions.h" + +void arm_fully_connected_q15_opt_ref(const q15_t * pV, // pointer to vector + const q15_t * pM, // pointer to matrix + const uint16_t dim_vec, // length of the vector + const uint16_t num_of_rows, // numCol of A + const uint16_t bias_shift, // amount of left-shift for bias + const uint16_t out_shift, // amount of right-shift for output + const q15_t * bias, q15_t * pOut, // output operand + q15_t * vec_buffer) +{ + + uint16_t rowCnt = num_of_rows >> 2; + const q15_t *pB = pM; + const q15_t *pA; + q15_t *pO = pOut; + const q15_t *pBias = bias; + + while (rowCnt) + { + pA = pV; +#ifndef ARM_NN_TRUNCATE + q31_t sum = (*pBias++ << bias_shift) + (0x1 << (out_shift - 1)); + q31_t sum2 = (*pBias++ << bias_shift) + (0x1 << (out_shift - 1)); + q31_t sum3 = (*pBias++ << bias_shift) + (0x1 << (out_shift - 1)); + q31_t sum4 = (*pBias++ << bias_shift) + (0x1 << (out_shift - 1)); +#else + q31_t sum = *pBias++ << bias_shift; + q31_t sum2 = *pBias++ << bias_shift; + q31_t sum3 = *pBias++ << bias_shift; + q31_t sum4 = *pBias++ << bias_shift; +#endif + + uint16_t colCnt = dim_vec >> 1; + + while (colCnt) + { + q15_t inA1 = *pA++; + q15_t inA2 = *pA++; + + q15_t inB1 = *pB++; + q15_t inB2 = *pB++; + sum += inA1 * inB1 + inA2 * inB2; + + inB1 = *pB++; + inB2 = *pB++; + sum2 += inA1 * inB1 + inA2 * inB2; + + inB1 = *pB++; + inB2 = *pB++; + sum3 += inA1 * inB1 + inA2 * inB2; + + inB1 = *pB++; + inB2 = *pB++; + sum4 += inA1 * inB1 + inA2 * inB2; + + colCnt--; + } + colCnt = dim_vec & 0x1; + while (colCnt) + { + q15_t inA = *pA++; + q15_t inB = *pB++; + sum += inA * inB; + inB = *pB++; + sum2 += inA * inB; + inB = *pB++; + sum3 += inA * inB; + inB = *pB++; + sum4 += inA * inB; + colCnt--; + } + *pO++ = (q15_t) __SSAT((sum >> out_shift), 16); + *pO++ = (q15_t) __SSAT((sum2 >> out_shift), 16); + *pO++ = (q15_t) __SSAT((sum3 >> out_shift), 16); + *pO++ = (q15_t) __SSAT((sum4 >> out_shift), 16); + + rowCnt--; + } + + rowCnt = num_of_rows & 0x3; + + while (rowCnt) + { + pA = pV; +#ifndef ARM_NN_TRUNCATE + int ip_out = (*pBias++ << bias_shift) + (0x1 << (out_shift - 1)); +#else + int ip_out = *pBias++ << bias_shift; +#endif + for (int j = 0; j < dim_vec; j++) + { + q15_t inA = *pA++; + q15_t inB = *pB++; + ip_out += inA * inB; + } + *pO++ = (q15_t) __SSAT((ip_out >> out_shift), 16); + + rowCnt--; + } +} diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_q15_ref.c b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_q15_ref.c new file mode 100644 index 0000000..3fd0bc0 --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_q15_ref.c @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2010-2018 Arm Limited or its affiliates. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ref_functions.h" + +void arm_fully_connected_q15_ref(const q15_t * pV, // pointer to vector + const q15_t * pM, // pointer to matrix + const uint16_t dim_vec, // length of the vector + const uint16_t num_of_rows, // numCol of A + const uint16_t bias_shift, // amount of left-shift for bias + const uint16_t out_shift, // amount of right-shift for output + const q15_t * bias, q15_t * pOut, // output operand + q15_t * vec_buffer) +{ + for (int i = 0; i < num_of_rows; i++) + { +#ifndef ARM_NN_TRUNCATE + int ip_out = (bias[i] << bias_shift) + (0x1 << (out_shift - 1)); +#else + int ip_out = bias[i] << bias_shift; +#endif + for (int j = 0; j < dim_vec; j++) + { + ip_out += pV[j] * pM[i * dim_vec + j]; + } + pOut[i] = (q15_t) __SSAT((ip_out >> out_shift), 16); + } +} diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_q7_opt_ref.c b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_q7_opt_ref.c new file mode 100644 index 0000000..cee8faa --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_q7_opt_ref.c @@ -0,0 +1,138 @@ +/* + * Copyright (C) 2010-2018 Arm Limited or its affiliates. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ref_functions.h" + +void arm_fully_connected_q7_opt_ref(const q7_t * pV, // pointer to vector + const q7_t * pM, // pointer to matrix + const uint16_t dim_vec, // length of the vector + const uint16_t num_of_rows, // numCol of A + const uint16_t bias_shift, // amount of left-shift for bias + const uint16_t out_shift, // amount of right-shift for output + const q7_t * bias, q7_t * pOut, // output operand + q15_t * vec_buffer) +{ + + uint16_t rowCnt = num_of_rows >> 2; + const q7_t *pB = pM; + const q7_t *pA; + q7_t *pO = pOut; + const q7_t *pBias = bias; + + while (rowCnt) + { + pA = pV; +#ifndef ARM_NN_TRUNCATE + q31_t sum = (*pBias++ << bias_shift) + (0x1 << (out_shift - 1)); + q31_t sum2 = (*pBias++ << bias_shift) + (0x1 << (out_shift - 1)); + q31_t sum3 = (*pBias++ << bias_shift) + (0x1 << (out_shift - 1)); + q31_t sum4 = (*pBias++ << bias_shift) + (0x1 << (out_shift - 1)); +#else + q31_t sum = *pBias++ << bias_shift; + q31_t sum2 = *pBias++ << bias_shift; + q31_t sum3 = *pBias++ << bias_shift; + q31_t sum4 = *pBias++ << bias_shift; +#endif + + uint16_t colCnt = dim_vec >> 2; + + while (colCnt) + { + q7_t inA1 = *pA++; + q7_t inA3 = *pA++; + q7_t inA2 = *pA++; + q7_t inA4 = *pA++; + + q7_t inB1 = *pB++; + q7_t inB3 = *pB++; + q7_t inB2 = *pB++; + q7_t inB4 = *pB++; + + sum += inA1 * inB1 + inA2 * inB2; + sum2 += inA1 * inB3 + inA2 * inB4; + + inB1 = *pB++; + inB3 = *pB++; + inB2 = *pB++; + inB4 = *pB++; + + sum3 += inA1 * inB1 + inA2 * inB2; + sum4 += inA1 * inB3 + inA2 * inB4; + + inB1 = *pB++; + inB3 = *pB++; + inB2 = *pB++; + inB4 = *pB++; + + sum += inA3 * inB1 + inA4 * inB2; + sum2 += inA3 * inB3 + inA4 * inB4; + + inB1 = *pB++; + inB3 = *pB++; + inB2 = *pB++; + inB4 = *pB++; + + sum3 += inA3 * inB1 + inA4 * inB2; + sum4 += inA3 * inB3 + inA4 * inB4; + + colCnt--; + } + colCnt = dim_vec & 0x3; + while (colCnt) + { + q7_t inA = *pA++; + q7_t inB = *pB++; + sum += inA * inB; + inB = *pB++; + sum2 += inA * inB; + inB = *pB++; + sum3 += inA * inB; + inB = *pB++; + sum4 += inA * inB; + + colCnt--; + } + *pO++ = (q7_t) __SSAT((sum >> out_shift), 8); + *pO++ = (q7_t) __SSAT((sum2 >> out_shift), 8); + *pO++ = (q7_t) __SSAT((sum3 >> out_shift), 8); + *pO++ = (q7_t) __SSAT((sum4 >> out_shift), 8); + + rowCnt--; + } + + rowCnt = num_of_rows & 0x3; + + while (rowCnt) + { + pA = pV; +#ifndef ARM_NN_TRUNCATE + int ip_out = (*pBias++ << bias_shift) + (0x1 << (out_shift - 1)); +#else + int ip_out = *pBias++ << bias_shift; +#endif + for (int j = 0; j < dim_vec; j++) + { + q7_t inA = *pA++; + q7_t inB = *pB++; + ip_out += inA * inB; + } + *pO++ = (q7_t) __SSAT((ip_out >> out_shift), 8); + + rowCnt--; + } +} diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_q7_ref.c b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_q7_ref.c new file mode 100644 index 0000000..78c891c --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_fully_connected_q7_ref.c @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2010-2018 Arm Limited or its affiliates. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ref_functions.h" + +void arm_fully_connected_q7_ref(const q7_t * pV, // pointer to vector + const q7_t * pM, // pointer to matrix + const uint16_t dim_vec, // length of the vector + const uint16_t num_of_rows, // numCol of A + const uint16_t bias_shift, // amount of left-shift for bias + const uint16_t out_shift, // amount of right-shift for output + const q7_t * bias, q7_t * pOut, // output operand + q15_t * vec_buffer) +{ + for (int i = 0; i < num_of_rows; i++) + { +#ifndef ARM_NN_TRUNCATE + int ip_out = (bias[i] << bias_shift) + (0x1 << (out_shift - 1)); +#else + int ip_out = bias[i] << bias_shift; +#endif + for (int j = 0; j < dim_vec; j++) + { + ip_out += pV[j] * pM[i * dim_vec + j]; + } + pOut[i] = (q7_t) __SSAT((ip_out >> out_shift), 8); + } +} diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_nn_mult_ref.c b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_nn_mult_ref.c new file mode 100644 index 0000000..e78850f --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_nn_mult_ref.c @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2010-2018 Arm Limited or its affiliates. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "arm_math.h" +#include "arm_nnfunctions.h" + +void arm_nn_mult_q7_ref(q7_t * pSrcA, + q7_t * pSrcB, + q7_t * pDst, + const uint16_t out_shift, + uint32_t blockSize) { + uint16_t i; + +for (i = 0; i < blockSize; i++) + { + q31_t product = pSrcA[i] * pSrcB[i]; +#ifndef ARM_NN_TRUNCATE + pDst[i] = (q7_t)__SSAT((product + (0x1 << (out_shift - 1)))>>out_shift, 8); +#else + pDst[i] = (q7_t)__SSAT(product >> out_shift, 8); +#endif + } +} + +void arm_nn_mult_q15_ref(q15_t * pSrcA, + q15_t * pSrcB, + q15_t * pDst, + const uint16_t out_shift, + uint32_t blockSize) { + uint16_t i; + +for (i = 0; i < blockSize; i++) + { + q31_t product = pSrcA[i] * pSrcB[i]; +#ifndef ARM_NN_TRUNCATE + pDst[i] = (q15_t)__SSAT((product + (0x1 << (out_shift - 1)))>>out_shift, 16); +#else + pDst[i] = (q15_t)__SSAT(product >> out_shift, 16); +#endif + + + } +} diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_pool_ref.c b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_pool_ref.c new file mode 100644 index 0000000..b75a0a2 --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_pool_ref.c @@ -0,0 +1,96 @@ +/* + * Copyright (C) 2010-2018 Arm Limited or its affiliates. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ref_functions.h" + +void arm_avepool_q7_HWC_ref(const q7_t * Im_in, // input image + const uint16_t dim_im_in, // input image dimension + const uint16_t ch_im_in, // number of input image channels + const uint16_t dim_kernel, // window kernel size + const uint16_t padding, // padding sizes + const uint16_t stride, // stride + const uint16_t dim_im_out, // output image dimension + q7_t * bufferA, // a buffer for local storage + q7_t * Im_out) +{ + int16_t i_ch_in, i_x, i_y; + int16_t k_x, k_y; + + for (i_ch_in = 0; i_ch_in < ch_im_in; i_ch_in++) + { + for (i_y = 0; i_y < dim_im_out; i_y++) + { + for (i_x = 0; i_x < dim_im_out; i_x++) + { + int sum = 0; + int count = 0; + for (k_y = i_y * stride - padding; k_y < i_y * stride - padding + dim_kernel; k_y++) + { + for (k_x = i_x * stride - padding; k_x < i_x * stride - padding + dim_kernel; k_x++) + { + if (k_y >= 0 && k_x >= 0 && k_y < dim_im_in && k_x < dim_im_in) + { + sum += Im_in[i_ch_in + ch_im_in * (k_x + k_y * dim_im_in)]; + count++; + } + } + } + Im_out[i_ch_in + ch_im_in * (i_x + i_y * dim_im_out)] = sum / count; + } + } + } +} + +void arm_maxpool_q7_HWC_ref(const q7_t * Im_in, // input image + const uint16_t dim_im_in, // input image dimension + const uint16_t ch_im_in, // number of input image channels + const uint16_t dim_kernel, // window kernel size + const uint16_t padding, // padding sizes + const uint16_t stride, // stride + const uint16_t dim_im_out, // output image dimension + q7_t * bufferA, // a buffer for local storage + q7_t * Im_out) +{ + int16_t i_ch_in, i_x, i_y; + int16_t k_x, k_y; + + for (i_ch_in = 0; i_ch_in < ch_im_in; i_ch_in++) + { + for (i_y = 0; i_y < dim_im_out; i_y++) + { + for (i_x = 0; i_x < dim_im_out; i_x++) + { + int max = -129; + for (k_y = i_y * stride - padding; k_y < i_y * stride - padding + dim_kernel; k_y++) + { + for (k_x = i_x * stride - padding; k_x < i_x * stride - padding + dim_kernel; k_x++) + { + if (k_y >= 0 && k_x >= 0 && k_y < dim_im_in && k_x < dim_im_in) + { + if (Im_in[i_ch_in + ch_im_in * (k_x + k_y * dim_im_in)] > max) + { + max = Im_in[i_ch_in + ch_im_in * (k_x + k_y * dim_im_in)]; + } + } + } + } + Im_out[i_ch_in + ch_im_in * (i_x + i_y * dim_im_out)] = max; + } + } + } +} diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_relu_ref.c b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_relu_ref.c new file mode 100644 index 0000000..9397ef1 --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_relu_ref.c @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2010-2018 Arm Limited or its affiliates. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "arm_math.h" +#include "arm_nnfunctions.h" + +void arm_relu_q7_ref(q7_t * data, uint16_t size) +{ + uint16_t i; + + for (i = 0; i < size; i++) + { + if (data[i] < 0) + data[i] = 0; + } +} + +void arm_relu_q15_ref(q15_t * data, uint16_t size) +{ + uint16_t i; + + for (i = 0; i < size; i++) + { + if (data[i] < 0) + data[i] = 0; + } +} diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/fully_connected_testing_weights.h b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/fully_connected_testing_weights.h new file mode 100644 index 0000000..31cdcb0 --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/fully_connected_testing_weights.h @@ -0,0 +1,7 @@ +#define IP2_WEIGHT {18,-12,-120,-75,60,-92,62,106,43,43,-108,-80,78,76,94,13,-125,63,54,-121,-61,26,60,-125,-79,112,-45,-97,-59,-100,28,35,-15,26,-41,-65,-99,106,115,109,-20,-75,83,-106,51,-55,25,-126,15,-46,-73,62,-89,-15,-37,-79,-12,43,-30,120,46,116,113,11,-57,-81,113,-53,4,117,18,-31,101,65,125,60,76,91,-53,-63,-74,73,-47,-51,-87,-27,-126,-12,107,103,79,113,-41,93,124,122,-72,67,93,-103,-97,-61,62,-17,10,30,124,-119,-17,31,-60,4,88,-76,18,25,-109,-47,19,33,102,71,66,-42,-111,8,-4,-44,78,40,-19,107,-118,11,-105,-116,48,0,-73,-101,-55,-20,-81,71,-121,60,107,110,103,-28,88,-85,34,-90,12,-105,-21,-10,-115,118,-84,97,86,-67,-80,-43,-107,115,108,-49,-59,22,19,122,-76,82,-16,93,67,-100,-57,-41,-43,99,-1,-69,-79,54,-46,24,-59,-1,77,-94,111,-20,-35,108,54,3,107,-59,17,-112,106,-108,95,37,63,60,9,-65,-63,7,-118,-69,-48,111,120,40,44,63,-67,108,26,-37,127,96,-54,-1,21,88,-24,-112,-115,-27,-9,59,-89,22,109,45,47,-42,68,-72,94,55,-121,-23,-2,83,105,-18,104,-34,29,-80,58,-104,-6,-20,53,-86,-5,115,94,39,100,70,-70,-69,-121,-106,-43,94,83,120,121,-93,-97,90,0,-26,-87,6,-26,1,94,67,-26,-71,-21,64,53,35,-46,-102,-58,-103,-7,-34,15,-19,117,-27,59,20,111,-31,-31,43,-36,-19,49,94,-17,119,32,118,110,-19,121,24,30,-74,-12,-38,52,21,-38,98,-58,63,-115,-84,29,22,-93,63,-127,-113,56,25,-2,43,88,107,29,14,116,88,-24,115,-22,-14,-65,116,-119,-95,88,57,-64,18,-127,8,-123,-51,-80,75,-8,-98,2,-109,19,76,40,3,117,121,-4,61,92,-56,21,94,47,-32,24,-50,-38,-26,111,-61,118,-111,94,-14,-74,51,-38,-116,111,62,-39,-121,97,109,-45,-122,-37,-62,108,-74,73,34,59,-21,-20,37,-2,-102,45,121,-41,-116,80,-2,110,-52,-39,62,-12,-127,52,99,13,124,-15,-89,89,85,67,-119,110,-38,-13,-14,-53,-97,119,-121,16,14,-53,-65,-118,26,-4,19,111,-44,22,-57,81,110,-26,-70,45,55,-55,108,-122,-78,-34,24,-69,90,-48,-76,-80,-123,-49,10,113,89,58,119,68,-26,109,-35,-90,88,-90,-66,-24,78,-122,-84,82,76,93,106,123,-52,2,-19,-125,38,36,105,31,3,-99,-27,74,54,-29,8,40,30,-111,21,-118,87,95,58,-29,-117,84,-83,114,-75,96,64,94,-23,-44,46,-77,-82,62,104,74,26,-91,7,63,81,14,-27,33,41,31,-9,64,-19,60,-79,21,-120,49,26,63,-8,105,-116,-58,65,87,-38,-27,109,-97,-50,63,83,-70,111,32,-70,104,22,-123,74,-61,98,60,58,-13,-80,-37,-62,76,-82,-26,76,109,25,81,78,-104,96,-29,-9,-6,-46,-120,54,-33,-30,-108,41,22,110,-54,78,52,14,-40,-70,59,-101,-38,61,-122,77,46,116,-3,-21,-124,-23,41,80,83,29,-71,-43,9,101,77,35,-119,2,93,-30,22,-62,97,-12,29,40,41,36,106,-87,21,93,-41,-112,60,-100,81,91,-89,-10,79,-69,-7,-113,111,-47,51,-23,14,16,-56,98,26,-50,121,127,-104,39,-38,44,-22,-73,-69,125,61,15,-78,-119,-47,-15,-44,-90,-72,29,61,92,109,-10,25,-16,-49,-31,-109,121,5,-2,-125,10,53,80,-13,46,38,1,73,116,66,75,-18,-50,99,-44,-126,-60,-126,-26,-57,-121,-35,105,57,77,112,44,56,83,66,-94,106,60,-119,-124,-25,57,104,106,122,-52,-51,-38,68,47,64,-50,25,-64,-72,-127,73,124,-51,-96,116,53,75,-18,97,97,-96,-12,-16,46,29,105,-118,11,53,-31,-127,-98,-126,2,-115,-116,12,-47,-70,-106,-41,73,-115,-55,-96,126,-124,-41,-48,-43,-6,18,-107,-106,-59,86,-5,85,89,-17,91,-71,103,-116,-122,-80,99,-26,-87,-14,-4,-110,52,-44,-124,-47,15,104,-52,-16,18,62,92,-92,-81,101,94,38,45,-77,-103,-124,74,67,70,-113,25,25,-53,-125,124,33,-84,-119,118,105,-70,-101,-108,-48,111,118,-91,-49,38,102,105,24,56,-95,-119,-45,-96,88,33,126,-101,74,-30,17,-35,24,-23,123,47,-41,-82,91,-3,60,15,-4,46,38,49,-8,-35,82,28,110,8,-58,-108,-124,60,125,-5,49,31,69,-73,94,-25,75,107,75,-1,53,-32,66,20,121,-75,-39,-13,-84,120,15,8,-33,-46,-30,-121,-119,-17,73,-102,-36,103,-20,11,-62,-80,-111,69,-84,-37,38,82,-87,8,69,-110,80,66,-41,122,102,125,-90,72,109,-120,-25,-56,-43,-44,-93,48,63,-59,-30,106,85,-83,-68,44,112,-75,-61,-127,-4,21,-124,-79,-111,-65,68,0,-111,62,-14,41,27,53,68,69,102,-55,122,99,-5,-74,74,2,96,71,107,49,88,19,55,10,84,-124,2,10,-47,-66,-1,-61,-70,3,-101,37,113,120,33,3,18,3,52,-86,38,91,-88,-48,-115,104,-20,49,-25,26,-108,-82,86,80,-125,-86,-73,-109,-72,-49,108,56,-8,-103,-10,-115,-99,97,-120,15,-94,-52,90,-1,-39,-1,-2,89,-103,-69,-82,-63,-32,59,101,-23,-83,-67,-112,-23,-12,-47,-105,-85,-117,-9,-80,-34,-38,108,-77,89,112,-63,28,-69,70,-99,47,59,82,16,-89,47,-78,-21,-101,23,115,-98,-89,23,83,-113,-26,6,-15,101,-72,95,15,-116,46,107,117,67,-98,45,21,-30,10,108,120,99,-30,-91,-96,100,53,-62,-126,54,103,96,-20,-57,14,-128,123,-104,-7,-62,-49,-94,105,108,-104,52,5,-91,114,62,102,-103,10,84,1,30,-102,-17,-112,91,-115,14,1,54,-110,4,99,-10,-35,78,84,78,-66,120,-110,-29,-92,105,-96,118,64,81,48,-127,-32,-9,51,69,-31,40,-84,111,4,-123,-43,54,55,100,-61,19,33,-65,-50,-27,42,120,-66,-126,-17,36,107,2,53,80,95,-94,17,64,50,-25,29,9,-67,-101,-24,82,97,-53,-58,-119,-40,-10,8,-99,60,-29,79,-79,-43,-127,-73,26,-60,-26,114,-82,-19,-111,49,3,-54,100,67,45,72,-84,-50,-17,123,54,-94,-86,80,-9,-87,-51,-57,-32,-92,123,40,-93,-44,-61,-24,-128,-85,-52,-56,-52,51,32,-23,-108,-32,8,-69,9,-2,84,-36,24,126,-80,-73,3,42,20,30,-46,-29,25,89,-30,48,115,37,57,-47,-95,-100,-77,-38,-8,26,-37,-23,-31,124,65,67,-87,35,19,-80,107,-71,120,106,21,-28,69,24,-110,103,-43,-68,94,95,-105,28,-16,-49,-6,88,121,-36,-83,28,-101,102,-28,40,-7,-108,28,97,11,-98,117,80,2,-92,-62,-43,-67,113,74,59,18,-72,-124,-126,-52,102,-128,-14,125,-116,-40,21,82,13,-2,59,-111,-110,-125,-44,-94,109,111,49,-71,40,-52,1,2,-73,-62,-40,-30,-93,-43,25,-103,-94,-110,126,-112,78,32,24,-95,-121,101,25,95,66,-63,5,72,-61,-83,-66,-88,-57,118,113,-110,92,-44,-3,15,24,-14,-114,14,33,-76,-75,80,76,-110,122,-56,101,12,66,-89,21,-76,42,86,-49,77,65,97,127,-20,43,0,-117,115,9,-83,-27,119,15,-122,4,21,-47,72,-113,-68,-98,-124,-89,125,-90,-83,35,-74,79,101,-65,127,60,-118,104,73,44,-41,-111,79,54,-70,-52,-97,10,18,-17,91,-46,-72,3,-35,-23,44,84,-11,-17,-11,-45,-38,67,75,-100,3,54,-16,-22,66,-98,-79,41,-110,-49,-76,-6,-33,-109,30,6,-18,84,63,50,-119,64,-127,-79,101,-91,59,-87,-51,0,-18,-23,-102,-99,120,-28,123,-86,59,-81,-22,-13,43,107,-13,-92,78,95,-10,26,-108,36,-57,-44,-118,-93,-62,-77,-33,-6,-50,-122,-103,-20,57,24,3,-25,-95,-91,-47,74,14,20,16,23,52,78,-15,-17,69,13,-98,126,84,115,74,-125,23,62,110,34,124,-38,111,6,106,-24,82,53,-102,-53,-36,7,60,1,19,80,-26,-111,58,83,-76,-19,112,121,41,-45,69,112,-95,98,-126,68,-37,-109,-55,-70,77,-97,35,-61,12,-58,54,-36,93,-48,4,10,104,102,37,70,4,10,-18,33,26,0,60,69,-49,26,66,-114,-22,-72,-96,124,16,-6,-92,-52,83,103,96,77,-99,4,80,10,-119,-108,-117,122,39,-13,-72,-7,77,-91,58,111,3,29,52,93,116,-123,-16,44,-60,107,60,-57,83,15,42,33,-93,-16,60,-97,53,86,5,-76,120,-42,-88,-35,18,12,110,-4,-62,84,2,-46,-14,-99,27,96,96,-69,15,102,79,-84,-24,-7,-64,-49,107,-51,17,108,-3,-41,-104,122,-123,-2,-58,-69,-36,-69,-33,81,-78,12,0,11,-63,125,97,58,-43,-63,-49,48,73,-78,-87,-88,-94,94,97,56,-31,-27,-113,125,-128,-25,-65,5,67,71,-26,7,40,-115,-55,-119,74,-34,-111,-42,-77,-15,-80,41,71,-121,-62,54,-95,-76,122,-115,101,-80,36,82,-55,-25,11,11,105,39,-98,-80,-77,-45,-58,93,-118,64,126,124,-46,1,26,113,37,107,108,-117,-127,123,-17,-120,-64,-35,-99,10,81,2,55,-110,-122,-120,-3,-24,-11,109,126,72,60,-18,92,-79,32,84,2,103,-7,-22,-7,-2,-108,-40,-55,45,47,14,-77,-60,50,43,-98,67,-52,51,101,107,105,45,-24,52,93,46,-61,-45,-36,-63,-33,-33,50,-81,-30,38,-124,73,-106,-90,54,-116,-86,-77,76,-63,-5,121,-22,-79,-73,-87,29,69,68,5,87,-85,-36,43,124,0,-62,104,72,-98,-63,-90,76,88,52,12,107,63,119,-54,102,-30,80,-63,-50,51,-5,79,110,-101,-11,32,80,-90,-22,-28,78,42,-76,89,-22,74,111,9,-78,28,-76,-17,20,-113,44,99,-82,31,-94,40,42,-75,-10,57,27,41,-29,42,-104,127,-70,-119,115,-77,54,114,-5,89,-63,9,-51,-68,-117,99,13,-23,103,-30,-117,76,78,112,-118,-16,-87,41,-23,72,67,-4,-69,30,-16,-18,-97,-111,-93,-68,-104,-112,55,-92,123,52,-14,-78,3,69,61,-35,-108,68,88,87,-114,-81,-126,26,-94,-111,80,10,47,43,98,28,-115,-122,103,-88,20,-58,79,33,103,-48,118,102,6,86,35,52,126,123,-62,62,-37,-126,-52,65,84,28,127,49,120,-67,-80,-8,96,-60,-25,100,-47,-14,103,-79,-29,-11,75,-77,-29,-56,1,-88,75,39,-36,-12,-71,-77,34,-98,-35,-103,-89,-41,-106,-86,-56,-36,-119,113,-17,-1,118,48,-59,101,-9,-51,-117,4,-71,31,23,6,80,3,40,-52,18,103,-127,50,75,-102,-56,0,47,-16,29,-15,-38,-32,-10,97,60,-4,-77,-105,-38,115,32,-14,5,-57,34,-22,-125,107,-32,99,115,64,-114,-90,118,-101,-25,125,33,-98,105,-88,85,-121,-66,-62,-46,-108,49,-19,-15,86,-83,49,50,42,-25,-128,-3,-89,-107,99,-116,-101,-45,-44,5,-53,57,-96,107,-77,-119,127,-76,99,-94,45,59,-6,-1,6,108,-71,-46,-35,-3,-26,4,104,-106,23,-51,52,104,-67,-74,-38,-125,-107,-9,-24,-93,75,-123,80,-68,28,-98,-119,-69,15,91,105,-17,46,-110,4,76,39,106,18,23,-55,69,-77,7,105,-16,-19,53,38,-95,100,46,73,23,44,86,19,64,87,-28,76,-1,81,-59,-123,-39,70,127,-120,81,89,110,-27,-54,-92,36,70,-45,-3,-12,-72,88,-109,96,123,-80,26,101,87,-113,-100,-45,0,29,122,111,-86,-67,-104,-87,-6,-109,-49,94,110,-85,113,93,-49,-110,-48,67,-85,34,-60,50,89,-34,-1,-46,12,3,-74,-25,0,-23,-48,-100,-98,54,-126,101,95,68,127,-118,-22,9,-106,84,95,-124,-31,-90,-39,18,23,10,7,45,35,52,6,-102,37,40,-31,-9,-33,69,-95,119,-36,6,-124,-3,-100,75,-91,126,106,77,126,112,-72,-60,53,-127,90,-112,45,115,69,32,61,69,-82,56,80,-40,-115,50,-124,34,-13,109,35,-21,-19,-82,90,65,-93,10,-121,106,39,114,-81,10,-43,-58,91,-26,-88,125,-36,93,-19,70,40,121,-26,-124,-28,-28,-70,18,-94,-120,109,10,100,-19,96,-78,-26,62,127,60,91,-6,-52,-64,-52,34,-47,47,-85,-49,-2,-44,91,56,-100,90,-62,124,-113,-67,-127,-15,-67,-39,10,53,87,38,41,3,-58,83,14,36,109,13,57,32,-37,-97,-18,-4,3,5,-33,-31,-7,46,73,-1,-120,-117,33,-82,91,76,84,-35,-128,100,41,117,-102,126,71,-50,18,41,16,-109,117,-86,102,-36,56,-66,-77,-92,-67,-70,-66,75,49,98,53,-36,50,103,62,61,-15,61,11,-19,-51,126,79,14,76,32,-120,35,-21,106,93,66,-74,4,13,19,-18,68,-90,-91,55,93,27,68,70,-64,-97,13,-32,-112,65,-116,91,3,37,13,-77,21,-17,83,53,-56,69,-86,55,-107,-116,106,-49,2,-5,-59,63,124,16,30,-81,-27,-61,-60,65,92,103,72,39,-88,113,112,-31,-52,55,-46,53,-58,-50,50,51,57,-71,-112,-99,42,76,-33,58,2,115,-111,15,27,-49,114,74,-63,5,123,-108,-73,-56,8,-26,-122,-35,88,40,18,51,52,20,65,-35,-24,-41,-7,67,65,-47,20,8,-118,51,107,36,17,96,-108,-69,-40,-72,-61,-67,-17,-109,61,-26,59,-83,-31,10,-25,-62,-47,-113,65,46,25,13,86,-61,-14,113,-52,64,-100,0,110,34,-64,-35,-88,121,-84,81,46,33,-19,22,-23,106,49,40,4,-76,-89,53,110,86,-50,-71,-67,28,14,49,-123,-66,-18,66,-100,-83,111,101,54,18,-70,63,9,-48,-70,-115,-22,21,-71,-14,-74,65,-71,-2,-77,53,-62,-35,-127,-100,33,24,-5,-87,65,82,52,0,87,-37,20,104,-62,-52,31,11,29,-45,-58,-54,107,126,-119,-113,-47,-9,-72,-77,43,102,-116,-4,-79,-120,-90,79,-117,39,1,53,-91,127,123,41,-70,-104,38,31,-53,-85,-18,-127,45,18,13,-59,-5,-75,-110,1,24,-60,28,-110,58,-9,0,43,-104,92,-125,106,-91,-16,-75,-1,113,-115,-83,-95,66,-25,63,-120,-96,-26,101,51,83,27,47,-75,60,83,63,-58,-26,42,-88,-22,111,116,-72,-5,-65,-44,-78,-70,12,-109,95,-71,-27,125,9,-6,-72,104,-39,70,98,-38,48,117,67,-66,-117,-125,-89,49,-72,-71,127,-67,8,8,36,-76,-71,-105,-127,70,-100,-78,115,-84,32,38,78,26,85,43,62,-79,56,-78,113,-2,-12,-37,4,49,-17,123,-87,51,36,-90,-62,-27,11,47,73,-1,-37,18,75,18,19,-109,30,44,-96,91,-21,-115,-88,85,108,-17,-18,52,111,32,-88,108,66,-9,113,13,-117,-44,-49,15,-37,27,28,-57,-15,125,106,43,60,98,-21,-119,36,42,52,6,65,52,23,-39,60,-46,-61,100,50,116,111,8,-128,87,29,-27,-42,93,122,125,50,-82,45,95,-86,6,-10,21,-23,87,21,61,-14,-102,27,-64,43,8,3,-118,-97,-82,-66,-119,-82,56,-13,90,-109,-36,-116,-21,-42,64,-38,-55,-77,-14,-97,93,126,-10,77,39,-78,64,-39,46,-17,27,114,114,-88,80,-86,-88,-20,-121,-7,97,-20,100,82,-3,81,-108,-10,-40,53,-54,59,-103,31,-58,96,85,87,-76,118,-60,24,-41,78,84,38,-56,121,39,-101,55,6,103,40,-39,117,44,-26,-67,14,-33,-71,36,-38,-88,73,-5,28,-41,-21,-31,33,-53,82,93,54,-28,-63,31,-17,94,-48,-128,115,-62,-89,36,-28,-4,-48,75,-104,25,113,-76,-52,103,24,-96,-24,-44,107,-17,124,-95,-75,122,-64,122,51,74,121,106,-45,41,-77,-91,97,-17,87,111,106,-25,-38,-109,-87,-91,42,-71,-97,-111,-69,18,77,66,46,96,10,24,-89,16,-25,10,-1,-114,26,123,68,46,75,-115,44,-125,-121,-60,112,48,-110,-50,-10,-55,-10,75,4,-79,53,-84,99,98,-36,56,52,-66,67,-126,-77,29,-31,-88,-35,26,62,79,-79,-10,-114,-52,110,-21,-22,124,47,-114,-18,-101,-105,-44,-50,-114,-12,-104,-77,-38,-128,60,-81,-110,30,101,13,107,-57,-69,-40,14,-97,-50,-54,92,-60,59,127,-128,-95,95,-8,0,-119,83,24,-96,-106,-84,96,-29,14,-80,82,-120,-28,-116,-55,-78,-31,95,112,-82,68,92,-121,74,75,-62,24,-5,97,6,42,-123,-99,82,-82,-70,56,16,118,-84,66,111,80,-82,-15,-104,69,-12,-76,-23,-69,-55,-46,-48,22,79,16,-51,34,-115,64,23,-106,-77,71,-8,107,46,-22,34,-14,60,-80,117,-8,89,-108,123,25,-58,15,-25,64,-114,-19,69,50,95,-7,-95,120,98,106,-41,-31,-120,-127,88,71,53,41,-50,-68,-80,40,55,96,26,-8,-6,54,96,106,98,-60,-71,90,60,-17,48,24,17,-36,10,95,74,126,-123,51,79,118,115,69,-106,-78,65,121,77,96,78,-70,-49,91,27,-91,-51,62,53,-68,5,-96,-108,12,-45,79,-19,-80,-61,-30,-40,127,-117,77,83,22,116,19,-70,70,-95,95,-77,-120,59,24,-41,79,-100,95,-112,-22,89,-99,77,94,60,84,-5,112,55,-33,-92,63,88,-89,-88,-23,123,-20,-6,115,22,29,125,-46,65,-118,77,-50,94,-31,24,111,-107,63,19,-71,22,-69,-102,-26,-26,22,85,111,126,-55,46,90,-13,34,77,-5,61,43,-29,-60,13,114,107,19,-64,-107,108,-101,-63,103,51,32,-26,79,-115,-91,22,-120,-58,33,-83,-114,95,-48,-126,84,-112,-38,-38,54,-52,-113,46,111,-38,-111,-69,55,26,-43,-88,-81,94,-96,120,102,54,80,-68,-10,11,53,-68,102,32,-50,-60,50,20,124,-27,-57,15,87,-92,57,-50,51,49,-70,-124,32,-76,-51,-3,-38,22,-9,-18,102,-78,49,27,-96,-47,-9,89,-81,-39,37,-82,-70,-88,-104,46,95,31,-17,10,-62,-66,68,26,118,-104,-50,-50,-17,-108,24,-120,-88,22,-31,59,-7,-5,-15,75,101,-102,-17,106,57,12,93,-99,-105,24,51,-14,-7,107,-111,46,98,75,-8,-101,121,42,5,4,89,-110,-42,21,-14,-110,-46,49,-67,-64,-20,-85,72,41,-89,95,79,89,-97,43,48,14,121,109,-53,-50,35,-35,-103,12,-97,-111,-17,2,-89,28,-126,-36,-96,-98,71,-98,-9,74,-59,112,81,-89,-123,31,115,28,110,-20,-109,101,-107,-98,122,-101,15,47,27,-63,-19,85,-113,99,-67,109,-45,55,5,18,-97,31,117,-3,104,-8,11,24,-63,34,-86,42,-65,55,16,103,51,-82,-121,73,-61,104,76,-115,-92,30,86,-30,-110,-51,-115,-43,-108,-13,114,-89,-104,-51,-26,-112,-83,-29,79,8,112,-30,-47,94,71,-21,89,-38,7,-57,-70,105,62,-116,76,-12,95,-94,114,9,55,7,-46,-95,-105,96,61,24,88,25,-126,42,31,69,20,-93,-86,126,-79,97,39,87,-74,-104,-71,66,-83,87,-81,108,75,8,1,-121,120,-10,-1,-29,-47,-20,38,-73,67,7,52,-89,100,-57,92,9,-38,-58,-71,-112,-57,108,-121,-17,-127,-59,40,0,-69,-45,-98,115,-67,49,55,-76,-97,57,-94,-67,-60,97,-25,-13,-77,91,-54,118,36,-122,14,63,29,-66,-41,-87,2,9,-83,14,-42,34,25,-36,54,19,93,95,69,77,115,115,-67,-20,90,110,70,-83,-68,65,28,122,-51,102,-112,123,-55,-6,-88,42,76,-8,-96,127,117,-121,-97,36,62,120,90,-58,-89,79,56,-114,-1,62,69,-44,-96,-49,-18,102,6,-43,-9,-26,34,-127,83,-97,-74,-48,0,118,52,-66,42,-74,126,-89,-107,-37,-72,-114,64,-109,51,-2,34,-104,47,-122,-20,65,-48,24,81,2,-29,122,44,-11,61,27,11,114,75,21,18,22,39,114,-46,-109,124,-41,59,-99,-28,55,53,24,77,-63,51,118,122,101,-48,11,71,91,18,37,-41,-86,65,-69,-48,15,-101,-2,-43,122,20,-102,-58,-97,-88,25,3,47,22,-91,51,37,-14,70,118,-2,-47,25,49,111,45,83,15,-70,-96,8,23,112,-8,-79,-89,49,68,-35,118,101,-1,39,11,-51,98,-5,-67,-64,52,-41,-128,-128,30,-128,74,113,-85,-25,30,-22,2,127,-20,13,-85,-92,-32,-4,-21,31,-105,3,-47,22,35,5,29,-82,126,62,83,-28,-4,-94,93,-93,-120,44,16,19,-67,-70,5,-31,-100,85,80,30,123,-89,-9,52,2,87,79,105,45,82,-93,-46,99,-110,87,-13,-4,-52,19,7,17,54,-92,-118,-127,-24,71,-79,55,-102,0,30,-71,-42,-6,-112,-78,-55,85,29,-32,-103,-54,72,27,-76,-95,30,-7,-6,67,112,76,-79,84,-56,7,-84,85,33,-86,-39,-77,-27,103,100,99,-43,105,68,12,85,44,-92,76,-109,31,20,27,-28,-39,78,30,94,46,-28,-79,76,-103,-26,25,52,-21,-79,9,26,-26,-84,-17,-102,15,-120,70,-100,89,55,-3,-125,-80,-65,-27,89,-41,74,-8,-63,77,99,-9,-9,89,87,74,-101,-44,-16,112,100,102,9,-47,-40,-41,15,-53,-88,59,-44,93,-8,-51,26,76,-54,21,102,94,23,-81,9,110,-125,-76,59,-45,22,-78,72,19,98,127,21,-113,12,62,-80,-27,-21,58,-38,7,-112,-109,-111,-123,32,73,-29,-65,8,23,20,-58,106,-101,-30,20,-93,-36,-38,48,31,57,-26,-76,-93,93,-33,-99,12,25,-68,64,-90,120,-86,82,-102,103,-11,56,-96,104,3,101,83,-82,8,36,-38,-72,98,-94,112,-112,-83,-60,-123,125,86,96,64,17,89,113,34,2,68,51,-85,109,-92,102,50,64,-57,-64,114,66,-37,-120,-32,-102,96,-38,-90,-114,-81,46,-15,108,72,19,118,-98,64,33,-58,-93,-13,70,-93,41,67,93,-61,99,-53,88,-79,-64,-85,48,-67,56,-54,-46,58,2,-14,58,-127,-72,73,34,-12,-50,-50,31,48,-75,33,-89,-7,-93,-76,-95,-96,-52,85,122,35,-14,73,-30,-107,-112,127,-22,74,85,-127,44,13,-78,-85,-63,-86,-121,-58,126,-117,71,113,59,-95,117,41,48,-73,2,-89,34,18,-3,90,112,15,-26,-5,69,46,-24,99,-6,35,38,-33,-55,52,104,53,77,-114,-37,43,-36,-70,114,36,88,-43,-81,53,-99,75,108,-70,92,99,-6,102,-80,-128,-112,119,-107,-22,36,27,123,105,-80,76,-103,83,127,20,-7,14,-52,76,-23,-128,123,63,-65,-111,-53,25,100,-6,40,40,34,-42,-25,-44,-40,8,-36,-46,84,41,-123,106,117,-89,69,-53,-33,-58,-41,90,-114,-68,26,-80,-124,8,-77,92,-49,103,-48,-27,-77,-50,-96,-113,-6,55,-5,-60,106,112,-6,-111,-89,-127,-38,-33,99,83,-88,113,-2,-23,-73,-7,-88,-49,76,69,-42,35,46,58,-96,67,29,84,117,52,-97,93,-113,64,123,-90,-104,109,-41,-26,-50,-48,85,-52,41,104,-20,38,45,25,-105,37,85,15,-92,79,-23,81,-125,-40,-49,18,1,-124,-34,-125,59,-97,65,68,93,64,38,-5,-31,-59,-74,43,-104,-62,-100,95,14,-85,-60,-56,-37,37,116,27,41,106,63,124,64,75,109,72,47,44,-128,-119,60,28,105,58,20,-104,-35,-98,63,118,-61,-11,-28,32,-97,92,57,114,99,47,-80,92,39,-115,-55,-35,-57,-79,4,-113,28,43,124,-31,-119,-83,56,101,-114,-53,116,-102,-126,-73,-124,-97,46,83,-17,49,-17,-13,96,23,3,-60,-93,-73,23,4,-35,-119,-71,5,-118,30,-51,71,112,121,-95,97,23,-37,47,55,102,-6,17,107,-16,-70,124,-81,28,-5,71,77,-70,43,20,71,44,-72,-125,88,123,32,40,-27,98,62,-6,35,47,49,-74,20,-56,-112,82,-50,22,113,82,-11,102,-67,114,-6,-41,123,41,-73,-102,-65,-97,-39,-41,70,-25,-21,96,58,74,119,-125,-112,-101,-57,87,116,-29,-25,-79,24,8,-83,17,76,-28,40,25,80,-59,-77,61,-50,41,69,-21,38,-56,61,26,114,32,49,50,-47,5,-53,29,-43,41,-5,-80,38,-112,49,49,-26,-34,-54,-95,50,103,16,95,28,-31,-126,-31,-2,-48,74,122,-83,-73,-22,-122,89,52,-12,13,18,117,-80,52,-36,88,-57,-37,32,-107,33,-55,15,78,80,23,-30,-44,126,125,124,12,125,73,-3,-8,37,-15,8,29,70,73,92,19,63,-5,24,-123,60,53,-14,-27,-92,20,-12,-38,49,-43,9,-118,111,39,110,50,-16,98,-85,21,23,30,-9,93,-96,77,52,-107,-58,-19,-72,69,21,-127,-43,-43,19,-39,121,-103,-125,58,-105,2,90,92,-49,-74,-95,-52,119,81,38,-13,-63,11,112,-2,125,-34,-82,81,13,65,-43,-88,-74,5,17,-112,-41,26,60,-71,58,-93,-92,-75,-65,-24,-49,119,55,-118,-4,125,34,7,97,20,60,-3,105,-44,-111,-96,-73,53,-79,-83,-53,59,33,-20,-3,-89,117,59,98,-104,-43,-48,19,100,60,-125,76,58,-125,94,78,-40,23,-49,46,85,45,-108,-126,-108,-19,-101,-27,-68,-111,-16,-62,-4,123,18,98,-82,110,-81,-41,-120,76,-41,-76,123,21,-55,58,-24,-86,-125,-94,-37,-127,-77,31,108,-2,30,-24,123,116,10,-16,104,-111,-68,80,-113,62,-64,64,-78,-81,127,101,125,-15,-54,87,-48,-108,86,-119,-55,52,122,-118,47,-121,59,-84,-45,54,-97,-72,94,-38,114,-105,8,-53,-61,69,-113,-27,-30,75,-37,13,-51,24,-49,-122,12,97,111,29,68,-111,-35,21,50,-9,-105,-94,90,43,52,-80,0,-100,61,100,-68,-89,103,-52,-105,29,-128,109,-32,52,-88,77,59,6,38,69,-31,-110,-85,102,112,93,-64,-79,-51,-117,70,11,-51,100,102,-120,-48,79,123,-86,-32,5,5,-108,116,111,-34,-47,-90,79,-17,40,-59,-85,95,-69,-9,42,12,-77,54,-75,-3,68,-128,-88,-32,118,-126,19,20,56,118,-84,-30,-87,87,99,-19,-125,-62,-31,123,-19,-56,-83,21,87,1,-38,-96,73,-30,20,22,95,35,45,87,-61,48,10,80,125,122,24,33,27,37,85,-30,-54,-99,-7,-75,68,-63,-28,-22,14,-84,82,-89,-17,-82,-63,123,-76,77,107,89,-46,49,-69,-88,96,48,5,73,122,33,-16,67,-67,-92,-33,87,-68,113,-23,-45,93,69,-128,-8,-39,87,-91,-104,-76,13,71,-17,-20,-128,111,80,-43,55,34,110,85,-128,-111,48,-109,102,-52,-93,-26,-25,-88,90,81,123,88,-119,-54,63,-96,3,-13,-40,-48,-41,-79,-10,86,69,-62,65,105,-116,49,-107,-98,-38,23,-76,120,86,-74,-69,119,19,-58,-13,100,23,-121,-4,-85,-85,-41,93,117,-52,-75,89,119,55,-13,31,98,-51,110,18,-17,4,73,90,106,99,86,74,-80,45,-18,102,74,-83,-119,124,75,-72,-18,-27,93,-9,-77,-65,-33,86,-76,-94,-11,29,63,-69,-106,-115,107,81,9,-117,44,77,-4,-36,-109,-78,-40,-94,-79,15,-59,40,42,117,44,-44,-51,71,124,-65,73,-46,59,-61,59,45,-56,-95,-96,16,10,-28,-94,120,67,-92,86,-86,-43,-7,-95,112,-37,74,55,-21,-75,-112,97,-20,73,52,-53,-59,-120,71,-40,58,91,85,77,49,-15,-82,-86,-39,-67,-122,-91,-118,-30,-36,-7,50,-89,93,30,17,-99,-104,107,-76,8,-37,-14,101,-15,83,92,101,-82,-46,-91,45,-74,-122,-70,-93,-41,-50,-38,120,-17,-106,-118,98,80,-49,-70,-52,13,-29,39,-119,55,62,-43,-82,-40,-89,-59,112,-120,40,8,9,-81,-62,-6,84,-63,80,-2,-82,-17,-47,100,-64,100,5,13,-128,-81,-122,100,87,29,-100,-49,6,53,-103,52,86,4,-41,17,-126,63,16,79,-89,92,-123,120,34,-102,77,90,-65,-62,101,-36,63,-19,-125,113,-18,-120,-85,-50,55,-34,-69,101,-108,-46,106,-31,12,37,21,-53,-64,122,121,-73,109,-74,-74,-110,-122,54,6,31,114,-20,-63,-25,111,69,119,80,-24,-25,87,-11,-113,-76,-103,111,10,2,94,-22,124,-117,90,52,-85,92,15,-76,-24,-74,102,-57,-47,86,-77,67,-110,95,64,-118,-84,-113,-1,-123,5,5,-108,-28,-33,47,20,-126,58,-45,34,-128,57,-44,-23,-124,123,-13,-125,-87,-75,-60,-124,125,-127,-105,-77,63,-103,122,-3,-106,-99,51,4,65,-115,105,-115,98,-36,32,110,-24,-33,84,76,10,29,22,-85,45,-126,-108,30,-56,-121,47,-121,-114,82,-34,-21,-107,-46,60,-78,29,2,-87,109,-68,-25,-84,80,106,-62,-64,-73,-72,42,29,-46,10,-43,76,-12,-121,-5,39,86,73,74,-32,-115,-99,112,-10,-68,-38,-18,103,22,-122,-119,-52,-76,-124,13,127,47,1,-29,26,-108,-17,-86,52,-28,-81,-35,-1,-99,68,94,12,97,-24,-98,70,63,-96,-58,-37,105,-48,-62,107,-113,12,121,42,105,-7,112,86,-18,116,117,82,123,-54,2,-110,76,-118,54,57,82,68,92,22,76,-109,96,-71,-88,56,81,108,-8,76,-98,-104,-80,-116,77,-44,16,1,-103,-127,32,-25,-109,-127,-6,83,123,33,56,38,8,4,89,40,-116,77,-109,28,12,-88,89,-65,-27,-87,22,-37,62,23,68,15,30,-43,-49,-42,-32,-74,-11,104,-24,-78,-20,50,-9,96,-73,90,116,-68,-43,47,2,-84,-115,2,-39,3,-17,-21,-114,-104,38,114,-68,23,-97,-96,-25,68,-39,93,80,-117,-27,-96,-21,23,-50,-109,44,75,38,-8,-16,-99,-110,-29,34,-128,117,-4,53,-77,-110,-35,77,100,-117,-4,-101,-40,108,-86,65,-44,15,-63,-83,80,-50,34,-61,113,18,-29,-31,25,-128,-4,-105,89,120,3,-107,-29,31,-38,26,102,-7,-6,-34,-44,-2,25,-23,-30,108,25,124,100,-48,-46,-60,-71,62,-118,-89,58,-73,96,-128,73,-87,-99,63,-24,124,-86,38,34,-51,27,-71,53,117,99,-7,121,-9,-35,-108,-64,-105,99,-42,-6,72,-22,-19,36,107,-109,90,-27,32,-112,76,106,-81,-63,-57,-29,-11,-24,-118,77,-80,111,-52,48,-37,123,67,-124,-64,-101,34,100,-62,-37,113,-68,122,43,112,-86,-110,64,-33,-17,29,38,-90,107,40,-58,91,23,64,58,-101,94,-22,78,-36,48,-8,-49,28,15,-90,36,103,45,127,-89,-84,-56,-27,103,45,-112,121,104,-13,118,24,-84,-66,122,121,12,-78,-2,22,-59,92,7,116,92,-115,62,-3,-126,-24,113,122,-71,0,-68,-105,59,-62,18,110,-24,13,48,50,8,19,64,-127,74,-46,-86,-99,14,-115,-18,-124,-42,51,-27,-26,-119,-99,97,82,-47,47,117,78,-59,-109,-13,-61,-49,12,-86,-91,47,-64,-71,-79,67,-33,56,6,-33,-29,-76,-16,95,94,-76,-72,45,27,-117,-99,27,-37,47,-58,69,-90,100,107,23,-44,-76,-50,-9,113,20,44,121,-125,100,43,81,45,-66,104,-65,-31,-54,-81,-13,20,-54,-23,-35,37,44,78,61,-102,-106,46,-79,-52,-59,57,-18,28,81,-110,-94,44,83,-43,-51,19,-78,7,80,99,59,-61,100,21,96,100,-55,-108,-90,-41,94,-37,53,14,48,116,-4,111,-9,-32,88,-61,-15,79,36,-55,67,-35,38,13,-82,-61,-61,-70,14,34,30,-99,4,-29,41,-94,14,-58,45,90,-24,-63,54,3,110,113,-18,36,-5,39,82,121,-101,-81,107,-57,-4,-51,114,-77,105,-82,-15,83,-53,44,14,51,-58,-44,106,-79,-21,-106,-47,114,-91,-76,-55,81,-128,94,118,90,2,116,-69,103,14,-62,-35,-32,127,117,77,87,-115,-16,-3,-104,-67,-39,-91,61,-5,-34,-62,102,-123,89,-38,111,-2,92,-29,-2,-66,124,107,98,-74,-93,-58,-65,-103,-38,-23,88,82,99,76,67,56,-62,-121,-17,-80,-77,-4,-45,77,-85,-75,116,7,0,76,71,-104,-70,98,-66,26,44,27,63,-44,-97,-13,37,-7,8,-125,11,100,47,77,112,73,67,68,-96,23,-35,48,-56,-11,29,-78,116,-72,123,39,-21,10,-21,47,18,40,-7,-8,1,-50,18,35,-103,-99,-49,7,-10,84,34,-11,-62,-105,38,-55,-101,-46,-103,-3,44,-90,-78,-71,-103,70,-60,-93,59,48,3,60,11,-112,-44,88,102,52,-77,-90,46,101,47,32,-19,-78,8,-36,-66,60,-71,39,-100,103,127,-95,109,11,87,-71,-106,-118,72,73,119,37,-41,68,-41,38,-84,110,-63,77,112,72,-90,63,125,76,46,95,101,95,8,18,77,2,2,114,99,-88,65,13,48,11,28,99,32,101,-94,84,19,-48,4,5,-26,105,-14,-36,68,-20,-43,8,28,-98,97,-89,-47,102,-67,-41,49,20,50,-118,-121,-74,82,-68,81,102,7,99,-89,85,2,71,9,-104,124,81,-110,17,73,-32,81,-15,7,119,116,-26,-12,39,-43,96,-68,3,-88,-93,-56,-36,66,77,102,-80,1,-44,-81,63,83,-80,29,56,-124,-60,80,96,126,-74,53,-16,-117,6,52,-57,45,20,2,-33,34,27,-16,21,127,76,-105,56,68,6,-26,-21,35,-108,46,10,-58,80,-100,-77,63,-10,111,71,-22,-3,95,104,-90,-38,-11,-104,-31,111,-113,26,-4,-2,-30,-2,58,100,-112,49,-76,101,-40,-106,-45,-126,39,-24,5,-97,-90,-84,-113,-77,-18,41,63,-25,42,16,-85,90,-4,-80,-2,-117,21,-75,-35,28,-118,-20,45,83,88,122,30,-78,-127,54,-13,96,34,9,103,-88,92,120,-59,-87,48,86,116,-36,-38,-65,103,104,-70,-1,90,66,-35,71,-54,-7,-107,-3,-78,-49,-105,-87,82,22,29,-3,-13,23,108,87,-65,-39,78,37,-13,-19,59,6,83,118,85,3,58,5,-113,-23,-47,58,83,25,-85,-80,87,86,84,-75,-111,106,-89,-17,71,32,-81,106,-30,-125,-50,95,-74,-14,-86,-78,102,53,-66,89,95,-35,39,-83,32,-86,-56,103,71,110,-79,-97,-107,-24,29,-19,84,103,87,48,-13,-14,-40,17,-64,-74,21,74,-29,2,53,-84,4,-113,50,66,92,26,5,34,9,-126,109,67,19,116,85,-87,-53,12,-99,87,63,100,-80,-62,85,-99,60,-6,-80,-59,17,-56,-111,-7,-114,21,-13,-110,-115,112,70,-70,-40,-47,64,87,74,59,52,-96,-79,-61,12,32,-119,57,80,27,89,16,-95,-78,23,90,-14,-42,-117,-49,40,-2,-122,-94,-47,101,-47,43,-94,22,96,7,-7,30,78,-110,-19,-66,-86,4,-83,118,-105,83,46,-104,75,88,20,-82,-106,-80,-71,52,121,117,-39,77,3,105,-112,49,54,15,33,61,-48,6,-76,2,-101,-54,8,-50,-36,-105,-55,126,2,76,10,95,44,-85,-53,3,-75,-42,-102,6,-70,-9,88,91,33,84,-18,-28,21,33,-65,-97,-87,73,103,-96,-67,93,39,-58,-49,92,-48,-75,54,61,123,-29,-68,16,-84,-90,14,-84,-100,-37,82,57,-61,84,63,101,9,-97,-124,-31,102,98,-57,-77,26,-110,-16,102,119,80,-38,-54,-35,-45,-115,-114,123,-35,-99,111,-52,10,-99,-112,-16,99,30,-50,109,-66,70,48,-62,-45,37,-25,125,22,19,54,61,116,-52,108,70,120,9,-56,71,-8,-64,-5,-99,-7,65,-60,23,13,79,-63,-79,96,22,89,61,-41,-51,51,88,-61,-12,45,15,-71,-9,51,29,-105,-82,33,13,-29,-73,43,123,33,-86,-90,41,106,10,-124,52,11,114,82,-60,30,-47,-118,-6,117,-33,-5,1,-57,0,-60,27,-17,21,46,-83,-121,98,-59,92,4,-21,-109,-88,75,-40,80,97,-32,9,127,-2,-15,109,17,-55,-53,-94,65,79,64,-29,-24,-123,-121,-109,-99,-43,10,-111,-79,-124,68,-55,-83,-85,103,112,-122,-101,29,0,97,-61,-67,95,10,-86,53,-42,-119,12,-42,-24,20,3,123,87,74,-12,-102,105,-6,85,10,116,24,40,96,-5,-7,19,43,-104,121,32,7,-6,16,91,-70,80,39,62,44,29,-114,68,51,50,-51,17,-120,27,-52,-43,109,49,0,-13,74,26,83,-44,-108,96,99,5,-33,-69,-35,-80,47,-13,-117,-65,-78,110,61,-75,107,88,-100,-55,-64,-73,-29,65,26,-86,77,-54,127,-56,-77,61,65,10,-18,-57,28,2,-63,125,-116,88,12,-112,106,78,-36,4,-98,63,-57,83,-32,40,-19,-72,36,-59,3,10,-114,26,-1,-87,32,-36,13,8,-112,124,-50,-1,-28,-47,63,10,-28,69,-42,-101,15,-89,19,59,-76,115,14,68,-83,68,-2,-19,19,-93,31,61,29,116,121,-80,-84,115,69,75,-22,68,-51,-27,-106,105,-109,-48,-65,54,123,100,-13,-110,-79,103,-28,10,124,91,114,95,13,39,-34,-101,-128,-121,-18,-35,-102,101,-127,74,-107,-100,-19,-84,-56,-33,109,-48,29,-65,-86,-26,-111,-119,113,-35,-95,-24,125,-85,-105,9,-76,2,11,90,22,48,44,-2,76,-11,72,91,-93,79,-28,92,-39,-23,50,-34,91,56,-101,-86,3,-113,53,46,52,-108,25,57,117,-108,-59,105,-127,-108,65,-92,15,-71,-23,114,108,120,-36,77,-23,54,-100,-65,112,118,69,-118,-78,-43,-56,94,-47,30,-49,-111,-17,-109,-105,-41,-25,-80,-38,111,40,11,112,-95,-68,-13,-103,-46,-91,108,32,52,-76,-30,39,-52,-57,-15,-63,-48,-23,-57,27,29,117,-74,-112,20,109,24,4,25,-64,125,-1,-63,-29,-25,-89,83,-3,28,-63,30,47,1,-1,-29,22,24,43,-18,69,19,90,-37,27,-51,69,98,-13,-96,72,61,44,-103,72,74,92,83,98,94,92,79,-26,115,60,-73,-73,-98,34,-90,58,51,-77,-51,67,-124,-50,28,-54,-43,-111,35,-97,-50,22,83,98,29,13,-44,56,65,66,-31,-111,79,124,-28,-72,118,-88,116,-125,-66,-120,78,-79,-42,90,-115,-123,-19,-98,-86,68,40,-91,125,65,91,-111,114,90,5,-68,-52,97,59,64,102,107,1,25,-64,64,-21,29,115,15,-8,74,10,-104,-99,35,-94,20,43,-22,-44,23,-106,104,54,72,49,-12,40,33,-12,-108,-85,-48,-123,-111,-105,-107,-116,54,-25,-17,46,26,32,-31,42,-21,30,20,94,-33,35,-30,33,15,28,40,98,83,-102,-88,11,-8,95,-73,-109,81,77,-44,115,-36,86,43,-16,-98,-72,-33,6,-18,-27,-116,-113,14,-91,-17,28,-64,-1,-58,119,-16,109,-8,-17,108,-58,43,-54,-80,-75,117,-58,-72,-51,4,-33,20,123,-97,-15,41,93,24,-86,-87,-123,-40,2,-111,57,60,11,-45,83,-43,-62,-125,-97,-51,-12,94,-74,-37,-123,-31,2,18,8,37,-1,-105,40,43,40,-63,77,-53,86,-95,-96,120,107,-67,18,38,-70,111,14,-109,98,-72,60,7,-121,-10,-128,36,101,20,126,-72,-29,-11,95,27,-74,-51,-115,18,-101,16,-59,-43,68,38,106,-110,38,-122,-46,-61,77,-110,-23,62,-33,32,-96,38,53,84,-80,34,-115,91,-19,106,35,7,18,-51,88,109,-114,-121,51,-76,-43,-87,-46,15,-55,83,74,-38,-3,43,82,-5,85,-100,-55,127,117,-75,90,92,106,-41,-39,-120,-41,35,5,83,126,62,-105,-33,117,-81,69,110,43,-122,43,100,45,-46,-104,-2,21,75,27,90,-82,80,110,24,-40,113,64,-79,110,97,-121,-14,-128,-60,-30,-91,7,-89,36,85,57,-17,15,11,91,-98,64,38,-96,67,-71,0,44,-8,119,123,38,-122,45,7,-6,-92,-111,-67,27,-95,-126,86,40,46,30,90,-123,105,127,81,-70,4,-123,86,21,-125,-12,-25,-119,42,22,46,78,50,-123,-112,-83,-19,86,-33,-109,104,-28,111,69,-48,61,53,-80,-102,56,105,88,74,6,-49,123,88,60,9,122,-32,94,-60,-80,73,-27,-9,113,34,-66,-93,-117,-35,51,36,45,-95,88,95,4,-22,98,-38,102,119,-40,-115,82,-80,88,77,-97,-49,99,10,-71,-3,-82,-124,-27,25,74,-9,21,-33,77,-43,44,-15,112,100,85,-124,90,-10,83,59,64,-108,-89,-1,77,-14,-74,84,-128,-11,41,74,80,95,-69,3,-86,-111,-26,-34,-54,-37,81,112,-40,-44,32,-83,-55,-62,52,-33,127,106,-69,17,-70,48,-34,0,-92,44,-110,22,113,-51,30,73,30,86,89,-90,-95,69,30,125,54,4,6,3,-80,-76,16,53,-67,-27,-42,-105,-98,-32,-66,-93,126,107,45,-110,19,125,54,121,102,52,-121,119,103,49,-32,90,-115,60,54,-77,-94,59,-119,42,-42,-6,106,-5,-90,-6,-74,-32,-81,113,-103,-69,-126,119,-90,7,24,52,115,-52,-96,59,74,-113,32,69,5,127,-38,-91,126,-126,74,-90,94,50,-39,-117,-22,-102,-106,-98,109,52,122,12,-111,123,-100,-87,35,-54,14,-89,126,-119,88,-107,62,-88,56,95,9,-95,-106,-25,69,84,-67,35,-42,-76,-61,-99,-88,-82,-24,-20,-26,75,109,74,27,-100,-55,-77,72,-6,52,76,96,-100,67,53,5,111,48,-16,38,89,3,-1,-115,59,-19,-16,-34,-61,-94,-115,-16,90,-110,116,65,-121,-117,104,109,-107,-26,-72,123,108,-49,55,36,-100,91,59,-93,-7,40,77,-91,84,80,102,-108,-113,-104,-22,-64,-90,-57,-37,-63,78,33,-95,-78,102,20,-105,94,24,59,-81,-39,120,54,-40,-56,-45,9,-107,-104,74,72,29,-45,91,-18,-106,11,91,-51,62,-87,-109,70,126,-49,-117,119,-89,-117,79,-124,-95,-93,21,108,122,39,18,48,3,-107,30,-99,-19,103,-91,83,-110,41,107,-78,99,-23,58,-99,39,50,-47,89,126,-119,58,123,31,7,23,43,-17,64,65,93,7,-26,-107,50,-11,-63,-24,-39,2,-55,-119,68,6,119,-90,-16,-92,93,111,-79,-89,78,-4,95,-7,-65,32,-100,35,-20,76,114,-126,-69,-13,-127,-43,-11,62,-107,77,10,114,-76,94,85,-97,99,50,-76,-57,-72,-117,86,9,28,124,14,-108,26,19,37,83,38,-125,21,-56,-42,51,-69,-3,-108,51,70,15,33,-125,-36,-122,-34,126,29,25,103,9,66,-126,54,-54,105,-9,-124,59,-105,78,76,3,101,-94,-67,-71,90,-7,62,-77,94,26,49,-14,-112,55,67,92,-26,97,80,-36,-13,106,33,-111,-110,51,-12,118,21,-75,-25,14,75,2,-109,123,-11,98,77,109,-47,6,22,-38,124,-100,61,27,-124,89,-54,-108,-28,123,-99,-24,-77,115,70,105,-32,49,-83,-99,-29,87,-11,79,26,77,-83,-22,-38,-13,-56,-82,10,-66,4,-69,-26,-19,-7,91,-58,35,101,-31,80,-5,-37,53,-73,-126,90,-76,20,-51,-1,55,51,-93,96,-39,-81,-64,-111,65,-47,46,-87,-65,-89,100,-36,-5,-9,-2,81,-37,-97,98,-25,117,-75,79,-81,-118,112,76,-105,120,34,-116,23,-125,-13,77,-73,87,-115,-108,-44,19,-96,-103,89,-56,-60,52,-3,-105,-59,37,-43,124,76,-2,25,57,92,-57,113,-20,22,79,32,122,48,115,-85,-6,-35,-103,9,13,93,-26,-123,-98,109,7,29,4,92,-54,-89,52,-92,74,8,55,13,97,-49,87,-26,-28,-11,14,72,-29,112,-82,12,4,50,-24,63,-112,84,74,122,23,57,-58,-125,20,-85,104,-32,125,126,-86,50,-83,14,-82,107,-124,26,101,-55,-118,-72,-100,-105,102,-111,-76,123,47,103,10,-14,-109,56,-70,104,27,-18,-33,30,41,-56,122,-117,-56,-76,-45,49,41,-34,-45,-35,100,77,-36,-24,0,102,88,123,11,116,47,-1,-9,-3,78,127,-108,33,64,27,-115,30,110,-105,-92,-15,56,21,20,-70,15,47,127,9,-21,122,83,105,117,21,10,-5,31,-91,-126,63,-7,-128,-20,46,106,22,3,-102,96,110,-106,71,-93,-52,112,121,-117,-74,-49,-7,118,121,78,76,-94,93,108,52,-67,-10,-103,54,62,109,5,81,-90,-100,24,109,22,30,-48,-36,-61,-36,119,120,-47,-92,112,-125,-41,-7,-11,-106,50,-23,32,84,-125,79,-36,-6,68,41,-97,-102,-51,-72,114,-105,126,-127,-13,53,-112,-71,38,44,-98,0,93,123,-60,-19,69,108,-68,-106,-68,-53,-55,-21,-37,118,-117,-121,52,-52,88,-36,63,-82,-72,-77,-25,68,115,112,62,-124,-71,122,-68,30,42,110,98,-42,27,22,-112,22,-56,-64,74,72,-92,32,-119,-50,-69,-64,-106,-59,83,9,125,20,49,-65,-128,-33,102,-28,46,97,28,74,-47,-59,-32,-113,-96,33,-54,20,-18,7,107,-61,51,6,104,23,15,-128,123,-92,-12,-75,0,-37,-89,-17,-14,-106,126,-5,-25,57,39,-66,102,82,32,28,97,-78,33,93,125,53,4,-74,-102,121,-51,-126,84,57,34,127,22,97,4,-24,88,-23,-65,-63,89,85,119,-99,97,6,94,-107,-69,18,107,-79,-25,-71,68,14,-16,-75,-21,30,-20,106,98,71,38,105,48,-41,110,-45,-70,68,8,-42,-82,110,29,-32,71,60,-77,-53,-20,6,-94,-90,88,107,28,74,58,-95,-19,26,-63,-73,88,4,21,125,82,-71,16,85,107,-67,-48,119,-17,27,-63,49,102,-78,-20,31,98,125,64,56,-100,23,-82,-89,-65,10,49,-105,-38,18,48,-50,-114,-23,87,71,-84,-28,-101,-65,34,-112,-18,38,-80,-120,-95,90,-79,-27,92,28,8,63,49,30,3,-85,-111,-114,52,-111,-53,42,-118,22,119,35,65,21,-8,3,72,-89,-111,-121,-29,45,-125,53,-122,-24,49,-64,-80,-107,-23,125,-84,-91,-115,102,26,124,-9,-72,67,-57,29,-34,57,15,-2,-14,16,-84,5,-95,115,-97,15,-58,39,2,-24,80,-37,55,-62,-43,24,38,11,-110,-76,54,-58,-109,112,24,-65,6,-127,-94,78,107,-67,21,-23,16,-29,62,48,-53,46,41,-123,-39,51,-82,114,83,14,93,41,-59,69,-23,-17,50,-113,-41,-117,40,-95,2,4,45,23,75,-110,-90,74,-18,77,9,113,97,66,-102,-76,-16,78,2,49,-105,71,-105,94,-43,74,-86,-89,71,126,117,-51,-72,73,-27,-100,116,17,-60,-83,-55,42,-45,-37,91,-100,-75,-51,-11,90,41,102,-99,-108,-8,28,114,-24,-41,127,36,-23,118,-44,8,-41,48,-62,-127,-89,124,3,89,-1,19,38,-64,-128,123,121,14,-99,-79,-19,23,88,-53,-80,-35,119,38,51,84,-104,-50,-103,10,-41,-39,-88,-118,-37,-55,46,-41,123,1,-94,-50,-24,119,-86,-110,93,59,51,-56,71,-48,0,-110,4,-4,-56,-99,-99,-31,29,-21,-65,-23,116,1,93,3,25,-29,95,-1,-109,33,77,21,-116,78,40,-124,14,-114,-50,35,116,-19,-52,112,26,-110,47,-120,72,-36,19,-97,-53,-28,-64,71,4,104,101,-2,44,-26,-102,-4,-18,8,30,-35,6,39,-93,-39,44,-3,-92,16,-87,-38,51,-87,-82,79,17,-20,28,-18,-118,-21,-19,-18,127,-48,19,-43,36,93,42,-46,-34,-70,-121,-51,-128,83,20,-19,120,37,-8,118,58,30,-95,63,-108,-55,-1,-80,78,1,34,37,71,-16,8,20,-55,8,-15,122,107,-125,-21,111,38,75,87,12,-20,-77,115,26,-102,-86,94,-85,-97,-109,29,95,-48,-22,-117,-104,-28,-94,91,-65,51,-79,-51,-90,97,112,3,59,73,16,-119,-88,-21,52,4,-66,-107,85,-114,71,87,-68,116,11,-3,-123,-22,81,-77,-72,108,19,118,-18,-54,21,-35,24,1,76,9,72,-58,-31,-1,-124,-19,121,-47,71,118,-83,-12,54,40,-125,45,23,-121,-46,81,-16,-73,-127,56,-117,-112,-99,-128,-81,51,52,10,27,97,67,112,67,-1,-97,-94,-42,27,91,-28,-9,-82,-112,50,12,108,3,-42,86,22,115,-72,74,3,-17,28,38,79,-29,113,32,-27,-61,-87,-99,119,-53,112,-82,-17,100,-111,80,112,-106,72,94,-124,12,-29,-88,95,54,-107,-123,64,-3,124,-83,-63,120,-91,-46,-117,123,-21,-108,-65,-26,-63,-115,-54,126,81,27,80,-6,-56,71,-91,-22,46,23,-39,26,42,61,74,46,0,-56,28,28,-75,66,-20,45,-72,-86,36,-73,-41,14,115,97,102,20,55,46,-120,-26,-18,-24,-46,99,47,-2,10,-57,24,10,90,43,123,10,-90,112,99,-16,54,-3,107,-72,-84,-125,30,112,127,76,-107,114,-120,49,-117,-9,-109,116,-103,52,-108,-37,-68,-2,-107,24,-110,6,-53,-6,44,13,66,-92,29,34,-57,-41,-49,45,47,99,-15,-11,-104,127,-110,3,68,24,-97,-97,49,89,-9,-1,-53,-6,-18,-36,-18,-108,-97,-118,-104,21,-11,-55,-16,59,-72,-118,-23,87,-79,-118,-49,31,116,-62,40,88,-7,-18,-91,-36,54,28,103,44,-16,-121,-2,-122,17,38,44,91,-70,52,110,29,-53,-88,-102,-101,-91,85,115,-50,33,-24,-66,-43,-14,126,-30,81,34,88,51,-85,-37,123,64,-74,25,-82,-17,124,40,-74,63,14,-41,52,-65,-118,78,24,-15,-91,-115,-89,121,93,-28,49,-28,14,-37,-49,-100,93,-7,98,-99,86,23,-111,114,58,-26,5,22,-20,-51,-29,21,-67,57,39,5,-79,-87,94,26,-36,77,-69,127,114,31,-69,62,-44,127,-26,-84,-119,34,70,-108,53,-125,7,-12,-76,121,-125,-85,-19,-43,-121,34,-59,-4,-54,12,-89,67,-38,15,100,-44,-92,34,-7,38,-19,110,-45,6,-45,17,121,-71,36,-46,-32,53,117,82,36,101,-47,7,-108,-71,-25,117,-112,104,93,115,-116,-90,55,8,-4,109,-83,104,-54,64,14,60,89,6,-70,109,115,27,26,-74,77,48,1,-26,-21,82,-50,-39,-87,-115,-26,-41,11,17,46,-84,102,65,-5,67,24,19,-43,-105,-11,77,-44,-30,20,-11,44,-71,-84,2,98,95,-9,40,-111,-95,112,-96,85,-102,-53,113,-73,68,12,84,75,72,-59,63,-35,-81,-58,0,-67,-13,5,-14,-37,-45,72,-90,89,49,12,120,34,-37,123,-104,113,-75,25,-100,-113,58,-99,11,-58,41,64,-93,43,53,-90,-75,92,122,-39,-26,14,-108,-81,18,-125,33,41,10,53,-74,-77,69,89,65,72,-12,13,40,105,44,-20,-109,-37,-64,-47,36,-98,-62,-38,-56,-112,-53,-96,60,29,58,-84,104,36,-103,37,-93,38,19,107,-120,24,-122,38,35,-8,-4,-65,7,9,-61,-33,48,0,-99,10,-61,104,108,-83,122,14,23,89,104,107,-100,31,-111,-45,-5,16,-6,84,-15,-105,-27,-28,-31,-86,-119,35,-106,-19,-45,-5,38,113,-14,70,-100,118,39,102,59,44,90,-47,59,-28,-94,-85,75,1,-124,-45,-90,36,86,-45,-16,19,122,-57,-111,11,-53,19,-36,-32,79,123,114,-124,-116,67,-110,-3,47,-19,-21,-33,63,-121,14,50,30,-11,-94,-10,-41,65,7,18,13,-3,106,73,116,2,-7,31,-6,113,-15,117,-121,60,68,117,-101,-57,-15,-27,114,36,-27,-34,29,-100,79,19,12,-27,-14,-4,-120,116,-83,124,2,110,-37,67,99,-43,-103,-64,-31,-30,-100,-25,-94,-16,-62,-80,12,-128,-64,-3,0,95,102,-61,-42,51,93,-74,18,70,98,-60,-67,-2,-89,52,-35,0,-80,-70,39,16,-115,69,-115,127,39,65,-4,-67,-43,22,127,-83,59,99,91,-33,115,-86,4,-5,107,-68,-40,-56,20,37,94,31,-62,-100,-85,83,14,-65,-7,106,61,-70,-77,87,104,-59,-23,-108,125,-119,-39,-102,-126,96,6,72,61,-127,88,-57,111,-62,65,68,-32,-78,5,-65,61,46,97,125,-47,16,81,-20,-77,66,44,116,-80,-18,14,-77,-88,60,111,1,93,-64,-55,97,53,26,80,-23,20,-52,73,55,42,-13,-85,-17,-11,-54,-31,-109,-102,64,-87,104,-105,-121,86,67,32,44,72,-84,-67,-62,-54,28,-61,-46,-124,-100,-120,-49,53,-102,-113,-19,-54,-114,-115,127,27,-21,-27,-44,-86,-126,108,110,-120,85,67,-58,-91,-128,-68,10,-64,-65,-33,67,-32,41,-17,45,-121,-78,-114,74,117,26,56,-125,69,-117,43,52,-38,-19,-42,-4,110,95,-89,35,82,-83,54,-37,-39,-24,103,37,-65,-5,120,4,64,-88,69,54,-23,104,-100,-73,-80,-126,77,-18,-15,27,45,1,-40,51,108,-74,-69,121,-45,27,110,-74,43,60,68,-79,-7,-111,-1,-63,-59,0,-90,96,-12,103,58,39,-18,88,-62,-26,-19,-111,51,73,-82,50,-84,-126,-23,-110,11,4,-11,49,-54,-69,-50,-27,65,20,-19,-27,75,-46,-98,-42,-74,53,-23,10,-59,-99,106,-87,-83,-4,-2,95,-12,85,58,-12,-9,88,-2,86,35,-81,5,-120,-87,-9,-40,78,-9,76,-32,-101,80,-98,97,24,-56,25,109,74,99,15,-78,-15,98,-17,-102,-79,69,74,123,94,59,104,-85,-80,-123,-19,84,-124,44,-87,95,-64,-120,105,-27,-71,-92,116,-110,-26,-101,-123,87,11,62,-79,-79,-91,98,9,-36,-112,-113,94,87,-29,108,38,47,116,-110,-6,-11,-118,-67,93,-31,-36,46,-53,117,-24,82,-76,121,7,108,-107,84,-39,-82,75,-31,51,78,-92,-69,61,26,-67,-127,-49,-37,-67,17,78,-47,-31,68,77,116,105,-74,45,42,-59,-109,-89,-10,-26,64,-28,109,114,80,-71,-64,56,-75,16,-50,-20,96,-23,-39,42,-84,46,94,61,-100,-43,-63,35,54,110,37,48,54,9,32,-40,17,-100,33,-33,-103,-90,-86,5,21,45,-75,89,45,-78,-18,-55,-97,23,-15,-5,-108,-41,-102,-9,10,42,-36,-28,-17,-84,-53,-76,117,104,80,-112,-10,87,51,32,96,-87,-15,47,-44,-16,44,-55,-34,-122,-65,89,-59,61,93,-70,-10,-124,-64,-65,-118,64,-88,-100,-68,26,-44,51,-51,-112,53,-38,43,48,-60,-55,-101,116,-42,-89,-59,-47,-41,37,-122,61,109,-97,-94,-99,85,-128,11,120,-32,-71,59,-84,50,-26,-111,118,-10,-74,-105,85,-63,75,-73,96,-122,108,12,-2,122,2,22,-128,-8,15,-50,20,14,-58,-99,-91,62,66,32,19,112,-38,-9,-101,-40,50,68,58,-117,51,94,-18,112,19,88,-47,73,-109,81,67,-49,121,-67,-113,52,-116,-38,-53,18,83,124,34,-116,66,74,-47,-96,-64,76,-125,74,97,36,-53,-30,118,14,-23,97,-10,-87,-54,-103,-22,-122,-6,80,-82,-44,-59,-56,65,-66,-65,-73,-84,82,-66,127,-63,24,-26,38,105,-109,110,62,-17,-51,15,-123,-96,-122,-111,114,-52,122,120,-49,-51,-19,28,-11,-22,-55,77,54,99,-121,30,36,19,-84,-53,59,-118,-127,-18,81,-94,-75,101,106,94,5,35,87,-114,84,-93,112,-55,34,84,82,-100,102,114,38,-66,41,89,-73,-107,-67,16,-119,61,22,119,7,-103,-84,34,-116,20,67,-57,61,-38,-94,-96,-51,-44,54,10,-62,15,108,-68,-123,25,-122,67,-41,1,-77,67,-4,3,-120,8,106,86,-26,71,10,-19,121,52,29,84,52,-27,73,81,9,35,-73,-15,-62,100,-19,93,5,-30,31,-71,-43,-63,10,3,-103,-41,10,-16,94,101,-8,-11,44,105,-113,87,21,-75,30,-79,-44,55,-113,-105,36,42,-100,-128,93,-122,-99,-72,-86,90,-9,-106,29,-58,33,85,45,-49,-115,38,-114,-76,115,-13,43,77,-82,23,-3,117,93,101,-1,-89,-71,-113,123,5,3,-64,36,69,-124,97,65,-109,-62,106,33,81,-46,-40,-33,28,-89,-67,117,29,-110,98,-36,102,47,91,55,-67,-34,57,31,-124,13,99,108,-9,105,99,40,-95,-64,114,-108,-60,-4,-28,-1,-126,-1,121,-80,103,-4,-104,-78,-92,20,120,113,-19,-46,-13,11,-105,110,19,-82,76,-85,89,-103,107,-35,-14,-56,-92,-95,83,10,123,-73,113,-82,-53,-128,-6,44,-64,126,44,-63,67,-25,45,-69,48,-76,47,6,89,115,-17,-100,-92,-106,33,-79,-60,44,74,106,-90,-120,-107,-59,89,33,96,66,70,-104,102,-35,-4,14,101,99,-3,-120,105,122,35,48,-125,7,101,-95,86,-39,-8,90,-112,127,-77,13,-36,27,-83,48,-10,-40,102,97,50,-48,-111,110,45,-72,-4,-86,33,-13,126,95,67,-1,-4,-66,-91,119,67,-32,35,-124,-36,31,25,118,21,-2,-24,126,49,-102,74,100,-127,-15,89,84,-83,-17,-25,-54,35,-123,28,-98,52,-27,75,-45,-116,85,-112,-43,104,51,36,-84,82,-122,35,98,-20,-17,-62,-99,92,92,-26,85,108,-70,-118,-78,-85,-56,-2,-60,-115,54,-77,-8,-28,-57,-81,-16,-57,-92,40,89,-58,-19,-125,-31,-90,44,-117,-88,46,-12,96,-93,112,-67,50,-41,0,81,-26,-128,117,-53,65,-85,54,105,-124,-84,-5,-16,13,101,92,-51,-115,98,109,40,-23,43,-41,-28,-45,-10,18,5,-125,48,-116,111,-54,19,20,33,82,30,-123,55,120,3,79,-32,-55,70,90,-33,60,121,1,-28,77,-64,22,-95,37,-40,83,33,-107,-72,-96,-47,59,-76,117,-34,-13,-81,-38,117,36,-106,93,33,-86,-118,81,-71,-49,-126,-74,-61,66,73,-91,80,-98,-56,-31,60,4,36,-104,24,-53,-106,44,-120,5,90,79,83,-88,34,71,-32,-78,-50,-39,-42,-21,98,60,86,79,6,43,-27,32,-6,57,-54,-98,71,23,-60,22,-126,-86,64,-28,-128,-40,63,53,-31,-124,-98,13,-98,-81,-52,107,-46,71,34,-9,108,-50,9,16,64,93,-6,11,125,2,45,18,15,-15,116,111,109,-47,-107,-17,127,-19,125,-95,97,-79,41,56,44,46,-8,-12,86,36,-56,-92,4,-111,127,76,95,77,75,87,67,91,5,-35,89,43,-80,47,-84,11,0,-33,-44,-73,-104,46,-48,-28,-38,49,105,-30,-95,102,-112,-62,-1,72,-54,-56,49,85,47,41,114,42,-67,-97,9,7,113,-85,-22,58,90,25,118,-111,-62,-47,-81,-5,42,65,-111,89,-126,-46,-22,45,118,25,-29,74,-62,-77,124,-1,123,123,-46,-74,-24,-115,-5,-111,-82,24,-1,109,-70,-13,-1,37,121,-66,-119,-36,19,-61,-62,-6,82,-103,48,94,-24,15,-106,90,13,124,-94,16,83,-38,98,-30,-101,52,105,-13,3,-98,58,111,-61,-16,-32,-47,5,41,28,-126,86,5,22,77,-34,-55,64,100,-104,44,59,121,70,-7,110,-12,-19,68,-124,30,-97,105,17,14,-100,-48,56,26,108,-78,-56,-3,81,58,-14,-73,-83,51,-51,-116,-20,114,55,49,106,-64,-75,24,57,18,-113,74,-86,-14,109,-124,-21,-121,-78,46,-104,62,-39,34,-47,-110,77,-107,-23,43,-82,32,-111,-75,1,33,78,60,56,-6,120,-90,-92,-35,77,11,-42,-81,-123,64,-78,-43,118,52,-62,-96,53,8,70,-64,41,6,80,-20,-104,-124,-101,90,-24,-17,-11,99,105,88,122,-114,67,-122,69,7,56,23,67,61,74,-65,0,-50,-29,21,-76,84,85,-42,-60,103,-102,107,-24,-110,61,-102,102,-27,-81,-110,4,-79,-9,0,58,-38,62,94,-99,-44,64,76,8,-74,-118,-96,102,-40,112,-81,83,-72,97,-9,-102,-126,101,62,-44,-122,-107,25,-35,107,-100,-124,-65,1,109,-102,0,-96,37,-84,26,-67,91,46,83,-23,16,57,-70,75,-14,-123,-72,-102,38,79,-78,25,-121,-112,58,-9,-128,-70,30,-40,-51,122,27,-92,-8,119,-115,-125,71,-40,115,54,104,71,65,120,-95,14,-96,-69,-89,13,-56,2,26,71,-70,87,126,11,-6,94,-31,110,43,97,-22,-83,-93,-79,34,-116,-102,44,43,-54,-65,81,89,51,76,42,-28,18,115,-33,108,-17,88,61,101,-42,27,39,-20,120,-2,-83,26,-100,67,-13,27,-60,-120,-15,-7,59,-39,-53,107,-54,-44,-123,-110,104,-119,122,-90,102,-51,1,-85,30,-75,82,-94,6,39,-92,3,60,-2,2,43,-71,-110,-55,-102,116,116,-128,-85,70,48,93,-83,-127,82,-35,119,109,-107,48,-23,-8,-127,95,81,88,-109,-45,73,46,89,-107,15,-11,-108,-67,66,108,59,-80,25,-64,108,-29,53,72,75,23,-29,-9,7,-30,103,-6,29,-63,57,54,74,-115,-3,116,-54,68,-31,-13,-115,85,120,-69,-79,-44,75,117,-28,-67,121,-46,56,-83,114,-86,11,7,121,119,-49,7,87,-117,-105,21,50,9,65,-122,-13,16,127,100,121,-43,56,45,59,18,-70,-17,43,-40,-19,123,-22,56,35,-16,55,67,-23,-60,12,101,48,68,25,118,103,-85,-7,42,-52,-32,-11,-44,31,71,-72,-15,114,75,112,-37,8,-32,69,-21,-30,-78,106,9,-109,-15,37,-106,65,127,47,115,24,-119,-103,-20,-8,95,90,-7,113,37,-103,-113,87,-79,92,-11,31,-49,-21,-64,89,62,91,-109,65,-2,62,-48,-55,-25,86,29,-81,0,-23,-5,-4,58,65,123,-121,-108,119,-104,117,-68,52,118,75,-19,-64,-126,72,73,-121,-91,42,-104,0,-1,-103,-104,16,-109,-50,-29,-32,109,-9,-19,-105,-103,-50,77,-123,-23,-99,-95,58,-14,-90,-21,-38,24,-74,94,-121,-98,110,95,4,-48,122,-69,21,23,57,-50,76,-112,32,48,-38,116,-62,-54,-57,-39,-32,121,60,-67,-41,-107,31,29,65,122,90,107,-128,126,101,115,76,-109,-59,-58,-52,56,-114,-115,102,19,55,-53,-83,-61,-103,-26,-63,123,113,14,-83,-59,59,-104,3,7,-1,-39,-51,61,25,36,-84,-30,65,69,-66,-75,66,29,9,-128,99,-70,-18,1,-68,-22,-96,41,14,-54,11,-5,62,-115,-87,-40,57,-53,-117,70,-12,32,-123,31,-44,-63,16,-43,-34,126,-82,-115,68,-121,98,-68,4,-80,5,35,35,-53,17,70,34,14,125,-122,80,80,50,113,-39,52,-34,7,89,-87,-118,-25,-94,58,118,-69,-112,55,17,116,53,33,-84,22,-49,55,48,48,-102,78,76,-55,112,101,-75,-55,63,32,98,19,79,95,-13,67,113,15,-22,-123,51,34,114,-10,88,-62,59,88,23,53,109,-42,24,-21,61,25,-34,24,50,24,6,-95,-102,-85,65,127,62,-59,41,55,-67,-99,11,78,61,-108,64,58,-54,21,-119,76,-9,64,23,-48,-82,54,6,52,103,59,123,-35,55,24,35,-68,-56,-39,-74,32,17,-29,-7,37,62,-103,-58,19,-37,-123,28,-53,30,101,46,88,-127,14,72,27,-124,8,94,-56,-90,-97,-80,-17,90,-32,-12,107,92,-110,0,54,-36,-69,37,-95,-74,98,-57,-72,-38,79,-8,-31,77,122,-62,-118,68,-6,90,109,-1,121,114,91,-51,-58,73,13,-110,40,59,-25,-121,-65,31,-87,25,35,-72,-22,52,-60,15,-117,-37,26,-15,-32,99,94,-94,-53,117,-7,-108,10,-82,-55,-58,-28,-6,122,103,121,31,-68,11,-26,60,-66,-97,81,117,65,90,73,-11,102,-56,104,12,-75,20,-116,76,-116,-115,32,74,-46,94,105,53,74,-8,-21,45,-2,-65,108,-5,39,94,62,20,-61,36,-97,10,8,54,-117,61,40,-123,24,-16,63,24,-4,11,28,61,-104,127,-46,-90,114,72,-70,-105,-7,60,-51,-35,-5,71,-113,102,-66,-83,111,52,-128,6,100,114,84,-77,-52,50,-94,-33,56,55,-114,44,91,63,113,-5,127,66,-73,55,68,13,-76,10,-95,94,93,-124,28,-82,-117,37,31,-27,-36,-72,-31,-66,69,56,-8,-123,-102,76,-113,40,18,95,47,76,-90,73,-84,-46,-75,55,25,7,-95,38,-34,72,18,-84,-104,62,-92,-5,-77,-67,85,16,122,63,-31,64,97,-23,-55,-63,11,-90,-105,-80,57,5,-60,10,34,56,-39,-102,-104,-87,-85,23,-96,121,75,32,10,7,61,45,19,-110,106,58,-50,67,49,76,19,81,19,-65,-25,16,-79,80,96,125,107,93,-119,-43,13,15,-76,-127,-29,38,-29,-95,-43,-92,-120,-126,22,-39,-34,-81,-91,43,113,-13,-7,105,94,126,100,-79,77,7,25,-99,113,115,-125,26,2,-5,106,-89,76,-106,-70,-92,-71,-104,48,-16,88,-21,123,82,-58,109,7,-47,-62,-62,121,-75,122,-100,-103,51,86,95,101,-99,115,27,-8,-97,-109,50,-68,-15,64,126,76,-94,-94,87,-13,-45,11,62,-27,35,126,-56,-115,12,39,54,108,-127,-17,-76,-95,61,-98,-10,-14,-65,-52,87,9,45,-66,-110,114,-65,-54,-7,-115,-126,86,32,-21,24,97,-117,-50,-52,49,-106,-116,53,-39,15,112,99,90,111,34,24,-70,16,80,-85,-29,113,-90,-21,69,120,-111,47,73,110,-36,108,21,-117,-72,-63,-15,84,-65,13,-40,-96,57,-15,44,126,-114,51,1,105,40,-20,77,76,44,34,-115,-28,-114,22,-108,-96,110,-128,42,69,87,-68,-96,-57,89,66,-86,-32,43,-14,41,-114,16,106,-27,-22,23,23,16,-57,72,-53,116,9,59,44,20,46,29,77,-42,-17,-119,-66,1,-75,-88,33,-94,107,78,-28,-125,-96,-27,-71,-43,-52,-74,-126,-86,-77,33,37,22,-105,124,-5,80,-124,65,29,14,-23,2,13,102,-11,-86,0,24,76,-18,63,-66,111,5,-15,76,-125,126,-82,-92,43,-3,-59,-126,-99,-46,37,-76,10,-127,-80,21,98,24,-62,-99,62,-51,85,70,43,-112,-97,111,-111,120,-54,-56,-52,-93,-30,53,-107,53,53,21,-104,-97,-30,89,25,-54,-62,54,88,-83,74,109,120,85,15,48,76,76,-74,50,-36,-52,-99,-112,121,54,18,-75,-40,30,-64,-72,110,28,-7,45,-91,-65,115,-67,-20,22,107,14,103,-71,-102,92,-33,33,-72,-4,92,100,110,-70,91,-27,-52,-63,116,64,-124,50,-37,-48,-93,-23,51,56,-77,87,55,61,-37,-23,-96,19,-73,79,119,3,-34,31,65,86,-127,-120,21,-39,-117,-78,-18,109,89,-33,-42,49,5,-28,65,40,52,-99,-27,114,-28,42,36,38,-46,-36,-88,-8,-94,45,116,-120,48,-109,78,-22,-20,50,74,11,-11,-16,-73,-127,45,109,24,28,-113,102,-33,109,111,-70,-40,33,-112,81,19,40,6,9,65,-25,-38,45,122,-57,-69,-65,-28,37,86,42,-113,119,11,60,-114,4,69,125,93,-60,-52,-58,-72,76,-8,93,77,69,107,-42,-84,-28,100,38,41,-119,-115,-114,-80,-111,95,-113,-122,37,-10,-118,-21,-6,-45,87,-30,88,44,54,101,95,-29,122,124,-101,-72,92,28,-74,6,-29,83,-48,67,43,-92,94,-69,-99,20,124,22,13,-76,-104,-46,-74,-83,-61,48,-81,-115,93,7,-85,-125,-81,-37,81,-28,-85,-14,-79,10,74,86,91,65,127,-66,87,-30,24,126,45,114,-32,-7,-25,-9,-45,-113,28,-53,-106,19,53,85,65,91,-67,-107,-106,-103,-31,49,27,59,-52,113,119,90,125,126,-13,90,7,58,-93,78,-124,-59,80,-59,34,105,-49,-100,-119,-126,-86,73,-54,22,-71,88,112,36,60,-9,88,-96,-113,-70,-83,-105,126,36,-9,118,-33,58,-47,-17,29,-86,98,13,-103,-106,79,69,-102,37,-104,-35,97,53,-99,38,72,100,-88,121,112,116,26,-32,-105,-98,97,82,-125,64,81,-81,12,68,-86,-56,-80,5,123,21,48,-122,-99,50,10,-98,94,-30,51,-86,-97,-24,-95,109,-11,61,-1,-24,-103,-125,-28,-101,73,-111,-32,-41,75,117,96,-9,36,68,-34,121,-122,-83,-42,84,41,-116,-101,-29,-51,-104,-32,65,-37,-49,-117,-22,106,110,-20,73,-5,-105,59,-96,-79,-47,-115,-115,-103,83,5,-104,-126,97,94,39,107,1,-105,-91,-103,-70,-92,121,82,89,-85,-103,-5,122,-43,-10,94,-59,-116,-12,72,-73,54,17,-43,71,127,-7,-125,-31,-57,126,56,-96,-37,36,112,-80,-42,26,-118,81,124,59,96,-36,-31,8,-49,-80,83,62,-52,38,-106,122,-112,93,32,-47,-67,56,41,-120,110,43,-44,-31,119,-64,98,54,76,64,-28,122,95,-7,63,-41,-48,-95,76,71,-94,125,-82,-91,59,65,125,20,109,-42,23,78,3,-91,-29,-19,-84,37,-21,59,-80,-84,-50,-77,-46,-42,75,6,-14,-46,-102,-81,-94,-102,-68,91,-26,-85,-61,-43,-128,-84,-55,87,-45,-67,90,-24,91,-20,117,81,-2,124,65,-113,124,54,-116,-106,41,106,-12,55,6,-93,7,31,-44,54,-50,-16,-119,-17,-23,14,88,22,-41,-9,-3,52,78,-33,-61,-16,114,-101,-57,46,-113,-76,112,121,-82,2,-3,-50,117,-74,104,67,64,-45,84,-36,125,30,11,-16,40,-69,83,-80,115,-127,-72,-41,103,-16,71,-33,-38,22,-39,-81,54,72,-73,20,-105,65,61,97,57,-122,23,106,-111,-87,-72,-97,115,89,113,57,38,-67,-25,-29,-93,116,-123,113,-68,-111,92,46,-25,27,-44,-11,79,101,-30,12,-89,-29,82,68,22,-17,-52,71,105,52,85,-112,-72,34,-109,17,86,-55,42,-90,22,67,119,43,-80,-14,51,40,-73,85,-51,102,95,28,-44,82,-28,-74,127,-104,31,58,-27,92,-125,-125,80,47,-47,24,-24,37,-71,123,91,49,102,67,-42,-111,97,41,48,-111,-45,81,-31,72,-64,38,-118,70,-114,-102,42,7,-87,-41,-9,-54,118,-48,121,-105,19,-28,-109,-84,-108,110,-55,-107,122,-74,99,69,100,85,-105,83,-66,-78,-8,-51,-88,-102,40,-5,-9,-110,3,-36,-20,120,-121,-97,-53,-37,-80,-46,-101,85,-61,-46,-22,117,-80,-120,64,-3,120,-46,-117,-121,-122,-53,-9,15,127,-29,11,-32,9,11,-87,86,15,57,-59,100,-90,64,-47,121,-34,-43,52,91,-116,-35,122,117,122,-90,115,-128,112,29,66,-73,39,95,-107,44,124,-31,18,-104,102,59,78,-14,-47,-30,41,-21,26,18,122,-19,43,-66,59,28,105,45,-3,98,-77,60,100,81,-22,8,3,80,105,-87,62,116,-21,83,31,-95,112,-114,-126,-58,8,121,-65,46,-112,-94,79,-128,112,24,99,-114,83,28,-104,89,-18,-121,-10,16,-73,-18,-97,69,-94,-81,-18,108,-86,53,-87,-17,-30,99,-23,54,1,-111,11,-52,-63,112,-55,-125,60,56,70,4,-103,114,89,114,-80,53,-50,49,90,-97,-54,-89,126,-17,110,-99,-30,-9,-71,95,74,63,92,-38,26,111,61,37,53,-76,27,110,-96,101,63,21,-99,121,68,-10,-124,-17,32,-83,-19,-92,-72,-26,-78,108,105,-80,115,60,-10,52,-74,-46,-77,-70,123,109,-77,-48,57,-54,-30,-37,22,-90,66,-41,112,-125,-1,89,120,-93,68,-103,-97,1,7,94,116,-108,39,-102,-7,-113,79,-90,56,-76,-8,38,27,123,-40,-111,87,-47,105,114,77,-9,-69,54,-109,34,-25,85,-65,-16,106,-94,-75,-103,87,12,-123,101,-41,-3,-1,-7,48,-46,56,-1,92,-18,-4,120,-46,110,96,81,21,92,-37,-54,36,121,-18,86,-55,118,101,87,55,49,79,-96,-28,19,56,71,-27,-127,110,104,107,30,65,-128,-107,110,-20,-57,112,-103,-41,88,12,113,117,-5,46,33,-20,-115,-113,-106,-19,101,-120,5,-125,-89,-107,-33,-116,-69,107,-85,-101,-39,44,31,-69,108,-124,-2,67,15,37,32,41,0,-20,78,59,79,-8,-80,-50,-82,-115,-6,12,1,-30,-85,-90,7,-61,96,-81,99,97,51,123,-107,-68,-102,127,-82,58,23,11,42,62,-82,-51,-59,-40,73,76,0,66,-42,103,-104,59,25,-48,-25,-99,55,-9,43,123,82,-108,53,-32,-20,-4,-36,39,23,-48,100,-1,-114,20,-108,74,114,-12,83,111,-77,89,-14,-37,74,6,126,-52,29,109,62,110,-108,38,-32,55,36,-92,-16,88,60,-84,0,-3,96,-50,36,3,-111,92,-3,-13,-23,19,-122,-32,-35,43,-48,52,5,62,78,27,-86,-59,-114,-19,60,-111,-75,0,-120,122,125,77,-128,-124,11,-112,29,74,18,15,43,82,58,63,-69,-26,-90,63,125,25,122,39,48,-64,-103,-107,41,-105,-122,84,46,-95,-57,39,36,76,-3,19,-21,-57,-56,-47,34,-30,-41,-128,-47,-10,66,118,37,119,48,76,97,95,-119,-71,17,66,-128,47,96,15,83,-48,117,-22,-43,-68,-44,-128,102,17,-16,62,-34,85,79,80,-11,-2,123,-123,-68,-36,126,98,-5,99,-56,71,76,23,45,69,38,28,-9,-96,-80,-107,-9,-87,1,53,69,-10,-69,-74,-107,-38,83,-7,-46,105,-117,-30,49,-126,-29,-55,35,56,-18,-4,95,119,-9,-114,9,29,-32,-19,-55,-123,72,-30,-17,-56,-117,121,-92,-18,-11,67,-71,33,28,-9,92,48,-100,-7,-120,-18,-37,16,-105,-18,106,98,124,45,-45,46,90,-39,-120,-67,120,125,88,-12,125,-42,114,-84,-8,-63,-17,-109,41,80,-57,19,82,9,-87,-4,-58,-52,-60,-76,20,41,43,126,-19,-110,-26,32,-107,126,8,-74,29,108,59,28,71,-39,-12,100,-82,89,118,97,-96,-77,-41,31,4,-119,-38,85,-23,7,116,53,-115,-35,117,-67,-122,75,109,18,50,115,99,97,-72,-94,-48,-22,-122,-21,-22,81,47,108,51,-68,-115,109,7,91,-56,11,-6,12,-15,-62,2,26,-100,52,111,5,60,-52,82,110,93,-116,-31,-62,-2,83,113,10,20,-82,-58,-78,0,52,-108,-67,121,20,-18,79,90,79,94,35,88,68,92,20,46,67,79,-21,-23,27,68,-50,-9,-16,-113,-76,30,-35,-86,-10,17,-102,-88,-89,-112,-99,-67,-123,-108,84,110,-9,-92,-57,73,31,-107,98,60,111,-82,-127,88,45,64,116,-125,29,-115,-33,-81,-127,-121,109,112,126,126,-76,37,56,39,-45,-35,-53,69,-74,94,58,62,35,-120,-17,9,29,-92,-66,-110,-71,-96,-52,-25,-55,-98,23,102,115,-84,-115,3,29,83,61,27,-40,38,-8,-102,95,-83,-115,96,-2,-90,74,0,-13,-39,98,-119,117,-78,-87,36,98,-30,-96,-110,-122,-105,0,-113,-23,-115,86,31,-86,21,-91,54,15,-29,112,120,-128,18,-35,-67,15,77,33,115,-18,74,-51,126,99,-6,46,37,-13,-33,-47,92,-88,-108,-43,-25,-74,59,-67,-89,9,8,92,-126,-82,22,88,-51,-48,41,-111,-55,103,-36,-41,29,-11,-6,30,67,25,-109,-47,-43,-120,-15,-40,-69,-120,19,-113,-61,78,-21,-121,-127,125,30,-20,95,16,122,10,111,-37,107,-77,43,-97,-98,106,-121,-86,-94,-104,-39,86,10,-44,99,-14,37,-52,113,-37,-49,-44,10,-61,-55,2,-107,36,78,52,115,76,83,54,125,86,20,97,36,55,18,-114,-49,83,-48,-23,-90,83,69,-73,57,-128,-85,-16,-11,49,84,-15,9,83,4,-60,100,126,-41,-81,80,-16,114,-2,-92,60,28,77,118,102,45,86,50,79,29,1,81,126,53,15,79,-110,-113,-87,-55,-95,-46,75,-29,-56,88,-90,-17,-4,-24,-57,4,-101,-38,-86,54,-80,26,70,-97,-112,-53,-57,-58,-97,-38,2,-30,30,-53,60,102,-113,-78,9,39,-9,28,-37,69,-11,98,-78,11,-9,-38,54,-27,65,-86,101,-82,102,-36,-66,-55,-123,-1,107,94,41,-103,-47,-21,26,-40,-57,43,127,127,121,124,-126,-104,105,-121,-39,9,-107,121,125,-67,-79,64,-77,88,-47,-96,-78,27,-19,41,-57,36,39,-54,101,46,-27,-48,-95,-60,27,77,-26,-23,-52,122,-101,101,-96,44,-48,-7,-109,23,53,65,17,-119,52,-15,110,-49,-124,-17,62,-122,-91,95,-56,-100,-81,77,-10,30,-124,34,79,-9,117,85,-70,3,-64,24,-29,-78,-106,97,46,-16,35,54,-44,117,52,-29,54,68,-120,-11,111,81,0,-123,-4,-42,5,-69,34,51,-113,-116,-108,-91,34,126,-56,126,74,-20,-98,20,75,87,-63,-123,-85,6,-70,8,72,-60,-25,-78,19,62,-32,13,6,-48,-83,20,-20,70,-30,-114,48,-107,-60,99,-10,101,-50,7,116,-33,15,-73,41,27,-82,-117,-56,-25,10,9,85,108,44,20,-69,92,28,-61,116,-55,1,-25,31,75,-68,-21,21,-3,22,41,-111,-22,25,25,12,-32,-10,84,41,-3,-11,96,-83,85,-33,-59,74,107,-80,-40,-102,123,-28,18,-93,115,-66,117,-128,-88,-10,-99,101,58,-3,-51,-47,40,4,-36,50,28,-57,-126,-91,100,44,-47,36,-124,117,-46,-47,109,-65,112,-43,51,-48,-116,51,-113,-106,71,115,-123,-111,-82,-18,-126,10,94,98,-39,-50,-60,-58,-14,43,-124,18,25,98,-99,86,77,35,-85,-58,-127,10,-23,79,60,119,28,3,-11,-44,7,-70,108,115,-122,58,66,-96,55,76,-2,-1,15,98,-121,84,-120,94,121,-80,-58,84,110,92,107,-125,-61,75,-4,-94,-52,-7,3,84,96,12,-48,-16,-25,-36,6,-91,70,-80,-22,91,61,-82,-77,83,111,-47,22,-82,65,28,119,63,-71,94,-53,-74,-119,57,-103,-81,12,-26,-73,-113,124,100,-91,-102,-90,24,113,11,3,-18,-4,-50,-73,72,-2,-16,121,94,-70,106,-62,-105,-50,4,-46,-34,-52,-31,-15,-89,62,-11,-78,43,-36,-104,-118,-68,87,-106,-2,-86,112,-51,3,-24,120,-78,-20,14,44,-58,103,-70,-15,10,93,9,15,-66,-75,74,-106,-117,-65,-8,16,-10,-31,107,-114,125,-44,-84,-75,26,-97,2,12,-27,-117,80,45,-115,-29,8,97,-74,108,75,-60,17,-119,1,-14,10,-14,-18,81,-81,11,8,29,-110,122,122,-24,-35,-120,113,-78,86,27,-31,87,-89,76,9,-114,-29,-75,-43,-12,-70,-118,-94,-1,70,62,-56,34,-32,-99,-126,-15,97,-38,-86,88,-37,20,94,119,103,64,41,-44,-66,-78,33,22,-67,120,-109,84,-106,-62,-34,12,104,36,-88,21,-35,52,-78,74,37,6,121,70,-78,-109,26,8,-18,42,102,-104,22,25,87,120,-8,125,-90,-82,127,-100,1,6,102,-72,78,-42,-100,-59,-87,-125,-13,-86,34,43,-12,-109,-61,13,36,87,-108,29,33,24,-124,-36,-114,34,-88,114,-41,21,-115,-71,-3,-108,36,-31,19,57,-95,97,-114,46,-121,-102,114,77,76,82,79,11,124,-82,-124,-50,31,92,113,-100,-102,27,-88,122,4,-87,7,102,118,30,-98,-84,72,-73,24,-112,-97,-125,-29,58,-101,52,48,82,111,78,71,88,-40,-58,-28,11,-94,125,-6,12,-18,50,-62,78,-18,-62,102,29,127,80,-31,-126,7,114,-25,-100,-116,120,-75,69,25,26,124,-23,-68,-15,-79,-5,-14,108,4,11,-69,-41,75,59,-72,113,26,-66,48,-4,103,57,71,-94,-2,14,-28,-36,22,-8,-25,39,-51,25,99,91,70,63,11,-124,69,46,-34,-21,99,-70,-110,-90,32,116,34,-74,82,43,-104,-56,31,-117,-43,67,12,-72,115,-84,-62,-9,21,-30,105,82,94,86,12,40,-47,-39,40,-114,-67,-89,-72,-64,-62,-124,-105,32,95,-124,-41,-14,48,26,8,-116,-57,24,-45,-45,-75,-40,-111,-118,107,116,66,-97,-57,-79,-96,-85,-55,49,-55,-32,-87,-76,-12,42,-85,85,-16,75,-41,-112,49,-29,-28,-124,-10,-60,62,-2,-112,15,-36,-33,81,-95,117,120,51,99,-64,30,11,106,-21,-42,43,-59,51,117,12,45,3,-116,110,88,104,60,67,102,-74,108,80,-58,-108,28,38,-108,16,63,100,-24,-36,-1,70,97,7,32,118,-112,-122,-31,-36,106,10,115,-89,35,58,-15,-5,63,19,-123,-99,-11,-94,108,-18,-13,70,-12,-1,126,-15,-9,-25,113,111,66,-59,81,-88,-114,97,-121,-76,16,8,72,62,3,-107,106,-43,92,-91,63,60,-90,-61,96,-9,93,-24,-17,-22,38,-24,29,-27,-36,-25,117,99,-10,76,66,-77,-71,33,-87,100,48,-13,-122,-49,56,-104,72,72,-84,103,72,115,-10,45,19,-22,52,-97,-77,-107,50,-81,-93,-79,102,-71,46,73,6,-21,-52,5,-96,32,112,15,-44,-4,110,5,-26,-85,89,-87,35,73,-17,59,-95,-5,-123,94,127,-83,9,-122,-64,-58,-72,-111,33,-91,-82,56,63,1,6,-67,-106,-55,26,-12,-105,-32,115,-38,-95,118,117,67,-17,95,99,120,-75,2,28,-113,-105,117,-15,111,22,-46,116,25,-91,40,44,84,37,-4,-66,-125,15,69,-14,49,-12,-11,87,-68,20,91,110,117,125,-65,-34,-36,84,-29,-87,-27,60,-66,-118,-125,49,69,81,54,7,-119,53,-23,-60,-9,22,-116,-125,-58} + +#define IP4_WEIGHT {18,-44,-120,40,104,61,29,-56,-12,78,-75,-19,-34,92,-80,21,60,107,62,11,58,94,-6,-32,-92,-118,106,-105,-104,47,-20,24,43,-116,-108,0,53,-50,-5,-26,43,48,-80,-73,-86,-38,115,111,78,-101,94,-20,94,-61,100,-111,76,-55,13,-81,39,118,70,94,-125,71,54,60,-70,-14,-121,51,63,-121,-121,107,-69,-74,-106,-38,-61,110,60,-28,-43,-116,83,62,26,103,-125,88,94,111,120,-39,-79,-85,-45,-90,121,-121,-97,109,112,34,-97,12,-93,97,90,-45,-59,-105,28,-10,0,-122,-87,-62,-100,-21,35,-115,-26,-37,6,108,-15,118,-41,97,-26,-74,94,34,26,-84,-65,86,1,73,67,59,-99,-67,115,-43,-26,-21,-21,37,106,-80,109,-107,-71,-20,64,-2,-20,115,83,-49,53,-102,-46,121,-75,108,-106,-59,35,45,-102,-41,51,22,25,122,-58,-116,-7,-2,-55,19,-126,-76,-103,80,-34,110,15,82,-73,93,15,-52,117,62,-46,-16,62,67,-19,-39,-27,-12,-89,-100,-37,-41,59,-127,111,99,-15,-57,-79,-43,20,52,-31,13,-12,99,-30,-69,-31,124,-36,-89,43,-1,120,-79,43,-15,-19,89,46,54,113,24,49,85,-17,-119,116,-46,11,-59,94,67,119,110,-57,-1,113,-94,32,-38,110,-14,-81,77,-53,111,118,-13,-19,-53,4,-20,18,108,121,-97,30,-121,117,-35,-31,54,24,119,-74,16,101,3,125,-59,-12,14,52,-65,65,107,60,17,-38,-53,21,-118,76,-112,-53,-108,-38,26,-58,19,91,106,-63,95,98,-4,63,111,-74,37,-47,60,-115,-44,29,-57,73,63,-51,9,-84,22,22,81,-87,-65,-126,7,-93,110,-127,-70,-27,-63,-12,-118,63,-26,-113,45,107,-69,79,111,56,55,-2,108,103,-48,113,120,25,-55,43,-122,-41,40,124,63,88,-78,29,24,93,44,122,-67,107,-34,14,-69,-72,108,93,-37,116,90,-24,-76,67,26,-103,127,88,-48,115,-80,-97,96,62,-1,-22,-123,-65,10,-61,-54,-17,21,-14,-49,116,113,10,88,124,-112,-119,89,88,119,30,-24,-119,-115,-95,58,57,68,-17,-27,-60,59,-64,-26,-127,-35,31,-9,4,-89,18,109,8,-90,88,22,18,45,-123,88,-80,-66,-76,109,25,47,-51,-90,75,-24,-109,-42,19,-72,-8,78,2,-84,-47,68,33,94,-98,-122,-109,82,102,55,66,-23,19,76,40,106,71,-121,-42,-2,76,93,3,123,-111,83,117,-52,8,105,121,2,-4,-18,-4,-19,-125,80,36,29,25,123,-72,-41,38,83,105,-71,-64,47,-127,-82,31,-43,-99,101,73,91,-51,60,3,9,-27,77,124,-3,-96,15,74,35,-29,2,116,-4,75,38,54,-119,8,93,53,46,-18,49,40,-30,-111,-62,97,-8,-96,82,30,22,21,97,97,-35,-12,28,-118,-12,95,40,-16,110,29,-58,87,29,58,41,46,8,105,-108,-29,36,84,-87,-118,-124,53,125,-117,106,-83,21,11,60,-31,-5,114,93,96,-112,-127,49,-126,69,-75,-41,64,60,-98,31,2,-73,94,-100,-44,91,-115,94,12,75,-23,81,46,-89,-116,-25,-47,107,-77,-10,62,-69,-70,75,-41,53,-82,79,104,-7,-106,-1,73,-32,74,-113,-91,-47,-115,66,-96,121,26,111,7,51,-55,20,126,-75,63,-23,14,16,-124,-39,-48,-84,81,14,-27,-56,-41,-13,-43,120,33,98,31,-50,-6,15,-107,-33,41,26,-9,121,18,8,-106,-46,64,127,60,39,-59,-30,-5,-119,-19,-104,-79,-38,86,-121,85,-17,21,44,49,-73,89,73,91,-36,-120,-22,26,-69,-17,-102,-71,103,63,125,105,15,103,-20,-122,-62,-8,61,-116,-78,-116,11,-80,-80,-58,-119,87,-15,99,-111,-87,-84,65,-47,-38,-44,-26,69,-14,-37,-27,-90,-97,29,-4,38,52,-87,109,-72,-50,61,-110,82,-44,8,63,92,-70,-10,-124,69,15,80,83,109,111,25,-47,-110,104,66,32,-16,104,-31,-52,-41,18,102,-70,-49,22,-109,-16,122,62,125,-123,121,-61,-2,92,-90,-81,109,74,5,98,-125,-92,72,101,-120,60,10,-13,80,94,-25,45,-43,58,53,-80,-13,38,-56,-77,-44,-37,46,76,1,-103,-93,74,63,-62,38,-82,73,-124,48,67,-59,-26,116,109,75,70,-30,25,85,76,66,25,-18,-113,106,25,-83,81,-50,-104,-44,-53,-68,124,112,78,99,96,-126,-125,44,33,-75,-29,-60,-6,-26,-84,-61,118,-4,-9,-126,-46,-57,-119,-127,105,21,-120,-121,-33,105,-70,-124,-108,-111,54,-35,-30,57,-101,-79,-48,-65,-108,77,22,44,111,68,-91,-111,41,112,110,56,118,0,-49,62,-54,83,52,-94,38,-14,105,27,78,66,14,106,102,41,24,53,-40,60,59,-124,56,68,-119,102,-70,-119,-101,-25,-95,69,-45,-55,-38,57,-122,106,-96,122,33,-5,61,104,77,122,88,99,126,-74,46,-52,-3,-38,-101,74,-30,96,116,-51,-21,68,74,2,17,71,-124,47,-35,107,-23,64,24,49,41,-50,-23,88,19,-30,10,-96,3,-14,100,-116,55,-91,84,100,-54,125,67,-40,-124,53,10,-126,45,21,-84,13,2,-62,-47,54,72,82,-50,-2,-66,103,-61,-20,-17,59,54,-110,-1,96,-70,-57,123,-111,-94,-125,3,14,37,123,-86,-44,-9,109,-101,-128,113,-104,80,-94,-87,111,120,-7,3,-49,-51,49,-32,40,33,-62,18,-94,-57,-71,-92,-52,3,105,-86,-104,123,1,-93,-73,52,108,38,52,40,2,-44,-62,91,5,-48,114,-61,-40,-128,-93,-88,-91,-115,62,-24,-30,-85,-43,104,102,49,10,-52,25,-52,-94,-20,-103,-25,84,-56,-103,51,-110,26,1,-82,-102,32,126,-108,78,-108,30,86,-17,-23,-112,-32,32,80,-112,-86,-115,8,24,9,-121,-125,91,-73,14,-69,-95,-2,101,-109,1,-49,-110,84,25,24,66,-72,54,108,4,-36,95,126,-63,56,99,-103,-35,-80,5,3,-61,-8,-10,-10,78,-73,72,42,-83,-115,84,97,-66,20,-66,-46,-57,-99,78,-120,120,30,-88,-29,118,15,-110,-52,-92,25,113,-30,92,-94,-29,90,105,89,-110,48,-44,-1,-96,-1,64,115,-3,57,24,-39,118,-2,81,37,15,-47,-14,89,48,-69,-32,-95,-114,-77,33,-103,-127,-82,-9,-100,14,-38,-76,-63,51,59,-31,-8,-75,-37,76,-32,69,101,40,26,80,-23,-110,-23,-84,-67,4,-31,122,65,101,-83,111,-112,-123,124,-56,67,12,-23,-43,-47,55,-87,66,19,21,-12,54,-105,100,35,-89,-80,-76,-85,-61,-9,33,107,42,120,-49,-117,19,-80,-65,-71,86,106,77,-34,-50,108,42,21,65,69,127,-38,-27,-77,120,-28,97,24,-20,89,-66,-63,-17,-110,43,-43,-117,112,-126,28,36,103,0,-68,115,-69,107,-99,53,94,9,-105,-27,70,2,47,80,95,-83,28,119,59,95,16,17,-16,15,-6,4,82,-94,-89,64,-49,-122,88,21,47,50,-21,29,121,-47,-83,-113,-78,-25,-101,9,-36,72,28,-68,23,-67,-98,-24,-101,-98,-28,-89,115,-101,-89,82,102,-124,40,125,23,97,-113,-58,-7,-90,28,35,83,-53,-26,-119,-108,-83,97,-74,6,-40,101,8,11,79,117,-65,-15,-10,-72,-99,-98,101,80,127,95,60,-116,79,2,60,-62,104,15,-29,46,-79,-92,-118,-43,73,107,-43,67,-73,-67,44,74,-111,117,-127,-98,26,113,-41,59,79,45,-60,-30,114,18,54,-124,-52,21,-26,10,-82,-72,-70,-126,-97,108,-19,-52,10,120,-111,102,18,99,49,-128,-17,91,83,-72,-19,-3,45,-104,14,-46,-76,3,112,-41,47,122,-77,-35,121,44,-45,-123,-60,-58,43,-23,41,84,69,-2,50,-69,-98,-11,112,-11,98,-36,67,-33,51,-17,-95,-45,-126,-69,-52,81,101,-38,68,75,-109,-78,107,0,45,67,-37,-100,-55,12,105,11,-24,3,-70,-16,-97,-63,52,97,46,54,77,-22,35,125,93,58,-61,66,-61,-79,-58,-43,-45,-49,-63,-98,12,41,54,-63,-36,48,-33,-110,-36,-76,-48,73,-33,-87,-81,-49,93,-6,4,-78,50,-88,-30,-33,10,30,102,-94,38,97,73,-109,104,6,37,94,-124,56,-106,-18,70,63,10,-31,-90,-113,-116,84,4,50,-18,-27,54,125,-86,-119,33,-127,0,-128,-77,-65,-63,64,26,-79,60,-25,76,5,-5,101,69,59,26,67,121,-26,-79,-91,-49,-87,66,71,-22,7,-73,-51,-114,-18,-72,40,-87,-55,69,0,-22,-23,-96,-115,29,-119,68,-102,124,120,-6,74,5,-111,-85,-99,16,-28,-92,-34,87,-42,-36,123,-52,59,103,-77,43,-80,0,-86,83,-81,96,-15,124,41,-62,-22,77,43,4,71,104,-62,-98,-13,-99,107,80,-121,72,54,-63,-13,10,78,-108,-95,-90,122,88,-92,-119,95,-117,-76,76,-115,52,-10,122,-108,-13,101,12,36,63,26,39,36,-72,-80,107,82,119,-57,-7,-118,-91,-55,-54,11,-30,-44,77,-93,58,-25,102,11,80,-62,111,-33,29,105,-63,-98,51,-77,3,-6,52,39,-50,-80,-5,-50,93,-103,-123,-77,79,-58,-101,-122,116,-20,-16,-45,110,93,-11,57,44,3,107,-118,32,126,-90,24,-60,-25,60,64,80,124,-22,-95,-57,-47,15,-46,-28,26,42,-91,83,74,42,1,78,113,-76,14,33,16,-16,37,89,108,74,20,-93,23,60,107,-22,-117,111,52,-97,-15,86,-127,9,-17,28,78,53,-17,5,123,-78,-120,-76,69,-76,-98,-42,-64,-17,-99,-113,13,120,126,-88,-35,20,10,44,84,-35,74,12,81,99,55,31,115,18,-125,110,2,-82,-110,-94,23,-4,110,84,-122,40,-3,-75,62,-62,34,2,-120,42,-24,-10,124,-46,111,-99,-11,57,126,41,-38,-14,6,27,109,27,72,-29,106,96,82,-69,60,42,92,127,-24,96,53,15,-18,-104,-79,-70,-102,102,-36,-84,32,-119,2,-77,-53,79,7,-24,84,115,103,54,60,-7,19,-49,-7,114,-7,89,1,-64,80,107,-22,-5,-2,-63,-26,-51,-108,9,-111,17,-40,-51,58,108,-55,-68,-117,-51,13,4,-17,-33,-110,-95,99,-117,-23,-71,46,69,4,119,103,31,-117,6,76,-36,106,-124,-30,23,76,80,39,6,18,-3,78,3,-118,-52,23,-100,69,-91,112,40,-16,18,-55,75,-77,126,-87,103,-23,50,7,106,-16,126,41,-127,72,75,105,77,-19,112,67,-102,-69,0,53,-72,-95,53,-4,-56,30,47,38,-60,100,-127,-16,-16,-97,-15,46,90,23,45,-18,29,-111,-38,73,-112,44,115,-93,-32,-104,97,86,69,64,61,-68,-10,-112,60,19,32,87,69,55,-4,123,-105,-28,-82,-1,80,-92,-77,52,-38,76,56,81,-40,-14,115,3,-14,-59,-115,-39,-124,-78,32,69,5,-123,50,70,34,61,-57,-108,-22,127,-13,81,35,-35,34,68,-125,-120,109,89,-21,88,107,-114,99,110,-19,-54,90,87,-32,-81,115,-27,-82,-92,65,-126,64,-94,-90,36,-93,-45,-121,26,-114,-111,118,70,10,-3,106,80,-101,47,125,-12,39,88,-81,10,-25,43,33,-72,114,-109,10,98,-98,-115,-88,96,-43,-80,91,28,105,-122,85,123,-58,26,-26,103,-121,20,-62,101,-88,-113,-36,-88,-66,-58,-46,87,125,-100,93,79,-108,103,-19,-45,-19,29,40,33,49,-48,-15,0,70,122,121,118,86,6,49,111,-26,-67,-28,102,-83,86,50,-86,-124,-104,-28,35,42,126,-128,-87,-70,-109,-94,52,-25,123,-3,-6,18,-49,-120,-62,-89,-37,99,94,109,-85,100,62,-107,-126,-116,110,10,113,-19,-52,-101,84,-44,93,96,-110,-26,65,-45,28,5,-49,-78,-48,62,127,-53,120,-96,67,127,34,91,49,57,-67,107,-85,60,-60,-6,-80,-77,96,127,50,-52,-34,-52,-8,-119,-60,-76,89,-64,-1,34,-25,99,-47,45,-46,-47,3,-85,100,-94,-14,59,12,47,-74,-49,103,-6,-29,6,-25,-2,-23,91,-79,-1,-11,108,0,-44,-48,56,75,-71,-29,-35,-100,-100,54,-62,-77,-46,-56,-3,-98,90,-126,124,1,-26,75,104,101,-113,68,-127,-88,4,39,-106,95,-67,127,-15,-36,23,-71,52,-118,-67,9,10,-12,-51,-77,104,-22,-39,-106,53,34,-67,-35,-38,84,87,-124,41,-98,-74,-103,-125,95,38,-31,3,-89,-107,-106,-24,-90,-58,18,14,-41,-9,-86,-93,-39,83,23,36,-56,75,-119,80,10,109,45,57,-36,-123,113,-68,7,13,35,32,-17,28,118,-119,52,-37,-102,-18,-1,-98,48,-69,6,-97,37,-4,-59,15,40,3,101,91,-31,5,-9,105,-9,-33,-31,-71,46,-99,-71,70,-77,-38,-7,-112,73,42,-2,98,53,48,-1,76,-117,58,-62,117,-127,-66,-120,-33,33,2,-35,67,-100,-117,-82,115,76,15,33,-125,-5,49,91,-111,84,27,24,-89,-87,-72,-35,-49,100,74,65,-71,52,-67,-128,114,41,-63,82,127,0,8,117,5,126,-108,87,8,20,-76,-102,123,71,-73,-37,36,104,-71,-50,-56,41,-26,-62,-105,31,70,18,8,16,-122,-52,-127,11,-100,-109,-35,-86,40,29,-78,-58,-84,117,88,102,18,-45,115,-54,32,-36,51,-66,20,107,38,-119,26,56,52,-77,65,126,78,-113,85,-92,-35,-70,-41,-47,43,-72,-79,-67,-24,-66,-7,-9,62,-77,56,75,67,98,-47,43,-78,-116,-2,49,65,53,20,102,113,-4,-12,-36,8,103,51,-79,-37,-90,49,50,-118,62,107,-120,4,79,-17,61,36,61,96,-117,123,1,51,-15,17,11,-108,39,-87,53,36,-19,-69,126,-72,-91,-90,123,-27,-51,-40,79,-61,127,-62,41,11,14,-67,32,-109,-70,47,38,-1,76,-17,-120,61,-104,73,31,-37,35,-26,106,-83,-53,18,-18,18,-21,59,93,-31,-85,75,-127,19,66,10,4,-62,45,-109,13,44,-74,-25,13,-47,18,30,-59,-96,19,-113,68,46,-5,91,-110,-115,-18,65,-90,25,-75,-21,1,-88,-91,13,93,-61,24,85,28,-17,55,86,27,-14,-60,108,-110,-18,68,113,-64,64,58,52,0,32,70,-52,-97,-100,-9,111,43,-88,13,0,-112,34,-104,108,-125,-9,-32,110,65,-64,92,66,106,113,-116,-35,3,121,-91,13,-75,-44,91,-88,37,-84,-16,-117,-1,-49,13,81,21,33,113,15,-83,27,-77,46,-17,-19,-115,-37,-95,28,83,22,-56,106,66,-57,63,125,53,-23,69,49,-25,-15,-120,106,-86,40,-107,-76,-96,43,101,98,55,4,-116,-89,-26,60,51,-21,106,53,2,86,83,-119,47,42,-49,110,-5,-50,27,36,-75,52,-59,-71,124,28,60,6,63,52,63,-67,16,14,83,65,-58,23,30,49,-27,-66,-26,-39,-88,-46,-81,-123,-61,-18,42,60,-22,-61,-60,66,92,-83,111,100,-72,116,65,-100,103,111,116,50,-5,111,72,101,-88,18,-65,8,-78,87,39,54,113,-70,-44,-128,-70,29,112,63,-52,-48,12,-27,95,93,-31,9,55,-70,-109,-42,-71,122,-46,-115,-58,21,-27,125,9,-82,53,-22,-50,-71,125,50,-6,45,50,-14,-72,95,51,-74,104,-86,57,65,-39,6,-10,-76,-23,103,127,17,-95,10,21,-52,87,24,-128,-36,95,95,21,-96,-14,-44,-8,74,-119,-123,61,-24,-102,107,0,126,83,51,27,-17,43,-95,24,79,-106,115,-64,124,8,-75,-96,118,-84,69,3,122,-97,122,96,-106,14,65,-118,-64,-82,51,-29,-78,-80,121,-66,74,-82,106,82,77,-28,78,-119,121,56,-45,-120,96,-116,-70,-13,41,-109,-91,-55,-49,-31,27,90,-77,-36,97,-78,91,95,-91,-116,-17,-42,111,112,-51,68,53,-21,87,64,106,-82,62,92,-68,-38,-25,-77,-109,-121,5,75,-108,-55,-38,-14,-87,74,-96,-62,12,-97,-91,126,-71,24,-45,97,-19,93,42,-10,-97,-5,79,6,-80,77,-111,-78,18,42,-61,-99,-40,39,-69,64,77,-123,-30,82,127,-39,66,-17,96,-82,-117,56,83,46,46,27,10,-70,77,16,22,114,24,-88,16,118,116,66,-70,114,-89,80,-25,-84,19,111,70,-86,10,-20,-114,80,-95,-15,-77,-88,-1,-121,26,-82,95,-104,-120,-7,123,-20,46,69,59,-76,-41,97,68,100,75,-12,24,-23,79,82,-115,81,-125,-69,-100,-46,-112,-3,44,-108,-121,-55,95,-48,-22,-10,-60,53,48,22,89,16,77,-40,112,-54,-110,79,-99,-51,94,59,-50,31,-55,34,60,64,-5,-103,-10,-58,-10,-115,84,23,112,96,75,87,-79,-106,55,71,-92,85,4,-76,53,-77,-33,-8,63,118,-84,24,98,107,88,-22,-88,-60,99,-41,-36,46,-89,34,-23,78,56,38,-66,-14,123,-80,-6,84,52,-56,67,60,-20,117,115,121,-126,-101,29,-8,22,-108,125,39,-77,55,-31,89,29,123,-46,6,-88,40,26,25,65,15,77,103,-35,-39,62,-58,-118,-25,-50,117,79,-26,-10,64,94,-19,24,44,-79,-67,-114,-114,-31,69,111,14,-52,-71,-21,50,-107,-7,19,-33,110,36,-22,95,63,-95,-71,-38,124,73,-114,120,22,106,-102,-88,47,-5,-18,98,-69,-41,-26,28,-101,-21,-44,-31,-26,-127,85,-41,-105,-31,-50,-120,22,88,111,33,-114,82,-104,71,126,41,46,-53,-12,93,-77,53,-55,-50,90,54,-38,-63,60,-68,-13,40,77,-28,-128,31,-81,-80,34,55,-5,-17,-110,-48,101,96,61,-8,-29,94,30,-128,13,26,43,-6,-60,115,107,-89,-69,54,13,106,107,-62,-57,36,-40,96,114,98,19,-28,14,-48,-50,-60,-64,90,108,-4,-97,75,-54,-71,-107,60,-101,-104,92,-17,-63,25,-60,48,103,113,59,24,51,32,-101,79,42,71,-83,89,65,-26,121,-115,5,-21,-68,-38,28,-91,4,-120,-110,7,122,-70,102,22,89,-58,-42,-57,-51,105,-112,33,21,-114,-110,62,123,76,-6,-83,-14,95,-46,-116,-55,-12,-88,-48,49,84,-64,95,42,114,-8,-126,-67,-112,-20,-94,76,9,-96,-38,-85,54,41,55,127,-46,-121,-38,72,-52,-89,7,117,-95,-97,-113,95,111,89,-105,36,61,120,46,79,-38,-97,96,62,24,90,-111,43,55,14,88,-58,-126,79,-69,48,26,121,25,-89,42,56,-43,109,-81,-50,31,-114,20,62,-88,-53,94,35,69,-1,-93,69,-96,-35,102,12,-86,-44,-79,-49,120,-103,54,-97,126,-96,97,-18,80,-111,-10,2,39,102,-74,-43,-68,-17,11,-89,87,6,-104,-9,53,28,102,-36,-71,-26,-83,-127,-68,-126,32,-96,66,34,87,83,-50,-98,50,-98,-81,-97,75,-48,-60,71,20,-9,108,-74,8,0,124,74,-57,112,1,118,120,-66,-27,-59,15,81,-121,52,-10,42,87,-89,57,31,-1,-74,-47,-89,-92,-123,-50,115,-29,126,-20,-107,51,28,-70,-20,38,-37,67,-114,49,110,-124,-109,-73,-72,7,64,32,101,-51,-98,52,-109,100,-2,-76,-107,-3,122,-89,51,-57,34,-38,-101,-9,47,92,-104,-38,-122,22,15,-18,27,9,47,-58,-20,102,-63,49,85,-71,65,-57,24,-78,-19,27,-113,-112,-48,108,81,-96,99,-9,109,-121,2,-127,122,-47,-67,89,-45,-17,-29,-59,44,-81,55,37,18,40,-11,-69,27,-39,5,-82,-97,0,61,-45,11,-70,31,-104,-3,-98,114,-67,21,-88,117,46,104,115,75,49,18,95,-8,-17,24,55,22,-97,114,31,11,10,-63,-76,39,57,-46,-62,34,68,42,-94,-109,-60,-41,-66,-86,26,-65,-67,124,97,59,118,55,-50,103,-25,-99,-77,55,-104,16,-50,51,-13,-28,91,53,-17,-82,24,73,-54,24,36,-63,-108,-121,-120,-61,118,77,-122,51,-88,104,-31,-115,14,118,29,101,22,76,59,-92,63,122,-66,-48,-7,30,-15,-30,-41,11,2,91,-5,86,75,-110,-87,71,9,18,101,-51,-17,-43,-83,37,-42,-86,-102,-115,106,-108,14,-41,34,65,57,-13,93,-89,25,-69,54,15,12,114,-99,-104,-36,-48,19,-101,-105,-51,51,-112,93,-2,69,122,24,-26,-14,-83,95,-43,77,20,-7,-29,-111,8,115,-102,-67,-97,107,79,46,112,115,-58,-20,-88,98,-30,90,25,75,-47,110,3,-8,94,70,47,22,-103,51,72,58,-12,7,-50,-91,-54,37,27,-38,-50,-112,31,-14,-76,118,30,-109,48,-123,33,70,-95,-2,-7,-111,-75,32,-89,-47,-6,49,112,73,-7,-65,-76,25,67,111,76,-29,-93,8,-95,45,-79,15,-56,23,-96,-58,85,83,84,-70,7,20,-52,106,122,-96,-84,23,33,-101,35,20,73,8,85,112,-86,-30,-14,-93,-30,-8,-39,-89,-27,-36,-107,48,127,-79,-77,49,103,-38,-112,31,-22,68,100,118,-43,57,74,-76,-127,-35,99,101,105,-26,85,-93,44,-1,68,11,85,93,13,-99,-85,39,12,-51,44,-33,-78,12,-63,98,-92,-67,-109,25,-86,64,-58,-5,76,-64,31,-68,-121,-90,126,52,20,-128,-28,120,-117,82,113,-41,27,-128,-39,-86,71,-102,59,30,78,74,94,103,-95,56,41,-128,30,113,46,-11,117,-96,48,-85,-28,30,76,104,-73,101,-89,-25,-79,-22,-103,3,2,83,34,2,-26,-20,52,-82,18,36,90,127,25,13,-21,8,-3,-38,112,-85,-79,-32,26,-72,15,-94,-5,-92,9,-4,-26,98,-26,112,69,-21,-84,-105,-102,-112,46,-60,99,31,-17,3,15,-83,-24,-123,-6,-47,-120,35,-100,125,35,96,-33,22,70,5,89,86,38,64,-55,29,55,126,-125,17,52,113,53,-82,-3,62,-80,89,104,34,77,83,-65,-4,89,2,-114,51,43,-28,-27,-94,-41,68,-37,-85,-36,93,74,-120,-63,109,-70,102,36,-93,-8,44,77,-92,114,50,88,16,99,-67,-9,64,-43,-64,53,19,-9,-70,89,-57,-81,114,-99,5,87,-100,-101,66,75,-120,-70,-31,74,85,-44,-37,108,-32,92,80,-16,123,100,-102,99,-38,102,30,112,-89,102,96,-6,-90,-80,-9,9,2,-40,-114,-128,46,119,52,-47,87,-41,-81,-112,-15,-107,79,15,45,-88,108,-22,19,27,105,-53,82,59,72,36,118,123,-93,-44,99,-8,-98,105,33,76,-46,93,-110,-51,64,-80,-58,-103,87,26,-4,-54,-93,83,70,20,-13,76,-52,21,-13,127,-93,-7,19,102,17,23,41,14,93,76,7,94,54,-81,67,-52,-61,-23,-92,9,-127,-125,99,-128,88,63,-118,110,-24,-76,-53,123,-79,-65,71,59,55,22,-64,-111,48,25,-79,-45,-102,-78,-85,-53,-67,100,0,72,-71,98,56,-6,-46,40,30,19,-42,127,-54,40,58,34,-6,21,-78,12,2,-42,58,-44,-112,-113,-55,62,-14,-25,-127,-40,85,-80,-72,8,29,-27,73,-36,-32,-21,34,-46,84,75,-123,72,-41,-92,41,-12,41,109,106,47,123,20,-73,-38,117,44,69,-119,-102,49,-97,9,-89,-128,-53,60,-65,-43,-39,-118,-33,28,-41,58,-41,111,-25,110,-58,105,90,20,70,39,-21,50,-114,-104,26,-98,96,-16,74,-85,-68,-35,-80,63,58,98,119,21,-124,118,-77,-11,-125,23,-101,-9,8,-61,92,-28,-112,30,-57,93,-49,32,-48,92,87,-96,-29,52,103,-97,-27,57,116,77,-25,-107,-77,114,-96,47,-79,-58,8,-72,-50,99,-113,-80,24,-19,-83,69,-6,92,-5,-115,17,21,-28,-43,55,39,-60,-55,76,-127,40,-43,106,-35,-6,-79,25,19,-59,121,112,-57,-111,4,80,-39,-77,-103,-89,-113,-38,43,61,-125,41,-105,-127,28,-33,124,-50,58,69,2,99,-31,-88,-83,-21,90,-56,-49,83,-119,113,56,38,92,61,-74,-2,101,-73,-53,26,-95,32,119,-23,-114,-7,116,114,-52,49,81,-88,-102,76,-73,50,38,5,-63,-49,-126,69,-124,-47,-13,-53,11,-42,-97,46,83,29,112,41,125,35,46,58,-17,-43,-2,-5,-34,-96,49,29,-13,-80,-82,-112,13,67,-17,84,96,38,81,49,65,117,23,-97,-60,49,-43,-34,-74,52,3,93,-93,-26,-88,-54,5,-113,-73,123,4,-95,17,103,-41,64,23,-90,-35,50,-112,16,26,-104,-119,-41,5,95,60,-31,58,109,-71,-26,-118,28,-71,-126,-93,-50,30,85,71,-31,-92,-48,-65,-48,-51,-52,112,-2,-75,74,-24,41,121,-20,97,122,-49,-73,55,104,-95,38,23,-83,119,-22,-118,45,-37,-105,55,-122,-4,52,34,25,47,37,102,89,125,-12,7,85,-6,-92,107,13,97,117,60,15,17,79,-16,18,20,-80,-3,-23,-70,-125,-81,52,105,88,-111,81,124,-40,28,-36,-44,-57,-96,-49,-5,1,77,-37,-73,-107,-79,18,71,-124,-70,32,53,33,-83,-34,43,59,71,-55,-53,78,33,-125,20,-97,44,15,59,80,-20,65,-72,93,88,23,-3,-44,117,68,-125,64,123,-30,-89,126,59,38,32,-31,-27,125,98,12,-43,-5,40,-59,98,124,-104,125,-48,-74,62,-104,35,73,19,-8,60,43,-6,-62,47,-3,100,37,-125,-100,49,14,20,-15,76,29,-125,95,-74,-85,-56,8,58,70,94,-60,-112,-37,-50,73,78,19,23,-56,82,37,22,92,-40,63,-49,116,113,41,-11,-5,46,-123,45,27,82,106,102,24,85,60,-108,63,-67,53,-126,124,114,-14,-108,64,-6,-27,-19,-101,102,-68,93,-45,-4,69,-109,-27,112,-111,-64,93,-36,-128,-78,-16,-79,-4,-117,-8,-40,87,-79,-62,-51,123,70,-39,-94,-91,15,18,11,-82,100,-104,-59,13,42,98,-51,110,102,-76,40,71,117,-81,-120,-120,79,-17,44,-128,-51,-41,-48,76,123,-20,-44,111,71,-41,-86,123,5,80,124,55,73,-76,-32,21,5,-43,-65,34,-46,-55,-108,-24,111,110,59,-128,59,58,116,-86,-34,85,-61,-111,45,-125,-47,-37,79,48,-56,102,-96,-94,-90,-127,-17,-109,-95,-52,16,-77,40,108,-85,-93,10,-25,-94,31,-59,-2,95,-26,-28,-88,120,30,-69,123,42,90,67,123,86,-24,-9,116,12,81,-92,88,-86,10,-77,104,-75,-119,-43,63,-95,-16,54,-111,-3,-54,-7,-96,112,-68,68,-113,-88,3,-37,-40,55,80,-128,62,-32,-13,74,-48,-21,-64,118,-78,19,-41,-75,-10,97,64,-126,-81,20,-79,-112,86,-20,127,56,125,-84,69,73,65,-53,101,118,-15,-30,-62,52,105,-59,-54,-87,-48,99,-116,-120,-107,-40,87,87,-108,-19,49,71,-98,58,86,-125,-55,-31,-38,91,-76,77,-119,-62,52,123,23,85,120,49,122,-19,47,-83,86,-15,-69,-86,-118,-56,-121,21,-74,-82,119,-39,59,87,-45,-38,19,-67,-13,-91,-84,1,54,-96,-58,-122,100,-118,-97,73,94,20,23,-30,-4,-7,-72,-30,-38,22,-121,-36,-85,50,114,95,8,45,-85,-89,93,30,-105,35,-53,87,-41,93,117,17,-61,-61,-113,10,-52,-99,89,107,69,48,-27,80,-75,-104,119,-76,-30,125,-37,24,55,8,31,-14,75,122,13,33,-13,-37,98,101,-51,27,-49,85,-51,-15,18,92,24,37,-122,-30,110,83,-17,101,12,-54,111,-7,4,-82,90,-91,97,-99,29,-75,73,-46,106,45,68,68,-35,-28,99,-74,74,-70,-111,-63,21,-22,86,-122,-80,-93,50,14,-105,82,45,-41,102,-38,-9,-84,-94,-89,-18,-50,74,120,90,-17,52,-63,-83,-17,124,-118,43,-82,-80,123,-119,-106,75,98,0,-76,61,107,-72,80,-27,-70,-100,77,100,89,-18,-49,93,-52,-68,-46,103,-69,-9,13,-65,39,-89,49,-52,-88,-77,-29,-33,-119,-105,96,-128,5,86,55,-94,-43,29,48,109,73,-76,62,-11,-82,-32,122,-88,-16,29,-40,-69,-59,52,33,77,67,63,-89,-106,112,59,-67,38,-33,-115,-120,81,8,6,-92,69,87,107,40,9,9,-31,-68,-117,-81,-110,113,44,-62,-85,-23,77,-6,84,-126,80,-45,105,75,-62,-8,-63,58,-2,34,-48,38,107,-16,-82,-128,-47,-44,-113,-99,121,-29,-17,57,100,-23,12,-110,42,34,-64,-124,5,-13,105,-128,112,-4,100,123,13,-125,-7,117,86,53,-128,-87,-122,-60,-18,-77,117,-35,-81,-75,100,-124,116,-110,82,77,87,125,-100,-105,123,100,2,-4,29,-127,-49,-77,-54,-117,-110,-101,6,63,-103,122,76,-40,54,-86,53,-103,52,-3,-118,108,57,65,86,-106,-41,51,82,-44,92,-63,4,-99,17,4,68,15,22,-83,-126,65,16,105,76,80,96,34,63,-115,79,-115,-109,-50,-71,-61,-89,98,-123,32,-88,113,81,-29,92,-36,120,110,56,18,108,-31,34,-24,77,84,-8,25,-98,-4,-102,-33,90,76,76,-128,-104,-105,-65,10,101,22,-80,89,77,3,-62,29,-36,-85,-116,120,-44,-107,63,45,-125,-108,16,-29,-103,-38,-19,-126,113,30,1,31,-127,26,-18,-56,-85,47,32,102,-109,-6,-120,-121,-50,-121,-25,-7,-127,-34,55,-114,-69,-34,-6,-44,123,25,-34,82,101,-21,83,-2,33,-23,-108,-107,106,60,56,-30,8,25,-46,-46,-31,-78,38,108,4,124,12,29,21,-87,89,100,-116,-46,37,2,-53,109,40,-48,77,-60,-64,-68,121,-84,-109,-71,12,-118,122,-25,-73,80,28,62,-88,-89,109,106,-74,-64,89,58,-27,96,-74,-62,-110,-73,-65,-73,-87,-128,-122,-72,6,29,22,73,62,-99,54,42,31,-46,-37,-87,23,63,114,10,-63,76,68,-24,30,-86,-20,-43,-25,-12,15,124,-43,38,111,-121,119,39,-49,34,-32,27,69,-5,80,86,-42,-51,-74,-71,-24,73,87,-32,-11,53,-24,99,-25,74,-11,-115,104,117,-78,-7,-113,-99,-103,-10,-20,121,-9,-35,-76,112,111,-68,50,-9,96,-108,10,-38,94,103,-73,-64,116,99,2,-18,-22,22,90,-105,-68,-42,124,-122,90,-52,-43,-6,2,-22,-117,-119,52,-76,47,72,-84,-19,-85,-124,15,127,-115,36,-39,-109,92,13,-76,47,2,107,3,90,-24,1,102,26,-17,-27,-114,-112,-74,-29,-57,-108,-21,32,-104,76,-47,-17,-77,52,38,106,-68,-63,86,-86,67,-28,114,-81,23,-57,-110,-81,64,-1,-97,-29,-25,-24,95,-35,-118,-99,-96,-11,68,-118,-84,68,-1,12,-39,77,80,111,-113,94,-123,97,93,-80,-117,-52,5,-24,-108,70,-27,48,-21,123,5,-98,-28,63,-96,-37,23,67,-33,-96,-50,-124,47,-58,-109,-64,20,-37,44,-101,34,95,-62,-76,-57,39,-51,10,100,94,-37,-72,-4,-21,114,-21,113,45,122,-117,-77,47,-82,40,-68,27,43,-99,105,18,-15,-7,112,27,-110,47,83,-8,44,-50,-86,-37,64,-58,-53,1,14,18,-33,69,29,100,51,35,-44,-99,-17,-90,38,107,-58,-103,106,-49,-90,23,40,-76,-79,7,-106,84,107,-44,-58,-50,-21,-10,-47,34,91,-9,64,20,114,-11,-76,-105,23,113,58,44,-91,-62,-55,38,-101,121,-22,100,81,-55,94,-46,94,-125,78,43,-128,-101,118,-103,-36,81,-8,-66,90,-3,116,-90,48,45,-49,104,2,44,-69,-78,28,-65,-90,-54,103,-71,-62,70,15,-31,36,-81,14,-103,-35,-60,103,-13,127,-54,-32,-93,117,48,45,20,-89,-23,127,59,77,3,-84,-35,-27,44,87,60,-16,-112,-56,37,103,78,-115,11,-3,-44,45,61,121,-106,-104,88,-39,52,-112,-102,104,46,-67,102,-91,-77,-13,-79,24,-59,61,-90,-34,101,118,-52,-84,57,-5,46,-62,47,-66,-18,121,81,102,32,89,-78,122,28,12,-110,-123,-19,-38,8,-78,-94,22,83,111,-36,92,60,-2,44,-59,-43,-2,-66,-29,-71,92,-51,116,-78,-2,39,124,103,7,19,92,7,-66,-100,107,127,-115,80,-3,59,98,-95,-93,11,62,99,-126,-61,-74,109,-58,87,-24,100,122,96,-65,-71,-38,-118,113,21,-71,100,-103,-106,-23,72,0,-55,-105,-90,88,73,99,37,-68,-108,59,-41,82,119,76,-41,-62,94,110,53,67,68,-62,38,18,-37,-24,14,56,-41,-121,-84,13,48,50,-4,-17,110,-77,77,48,116,8,111,-80,-63,-4,112,19,-9,-127,88,-45,72,-85,63,64,-32,74,-61,77,-90,-75,125,-46,-15,-99,36,116,76,0,95,-86,79,14,-55,7,46,76,101,-115,67,-124,38,71,95,-70,18,-18,-35,-42,13,-104,8,98,77,51,-82,-26,-61,-66,2,44,114,-27,-61,-119,-70,26,2,27,99,-99,14,82,30,63,-88,-97,13,97,34,-47,-99,-44,65,-13,48,47,4,78,41,37,11,8,99,117,-29,-59,-94,-7,28,-125,32,-109,14,-61,45,11,101,47,84,-13,-58,-49,90,100,-94,77,19,12,-24,-91,54,112,-48,67,5,-86,-63,47,3,73,4,68,-26,-64,110,-79,-18,-96,105,-35,-36,-71,113,67,36,23,-14,48,68,-33,-5,6,82,-56,-20,29,8,56,39,-33,121,-11,-43,-78,28,-29,-101,116,-98,-76,-81,-72,97,-16,107,123,-89,-47,-84,-67,-77,-107,105,29,49,102,-113,-41,-18,-24,-112,-19,54,49,41,50,-25,84,15,87,61,20,63,-118,42,103,33,48,-48,-121,16,82,90,-13,6,-40,2,-74,-85,-68,-4,-14,-76,17,-101,81,-80,7,-117,-64,-54,21,-50,102,-2,99,21,-74,8,74,-36,-89,-75,2,28,-29,-105,53,126,85,-35,71,-118,2,-55,-84,2,9,-20,124,83,4,76,50,95,-104,45,81,88,-113,10,66,44,-110,122,73,-78,92,-85,5,3,17,30,-32,-127,26,-53,34,-75,81,54,7,96,9,-42,109,6,-15,-13,119,34,-126,-102,67,-70,116,9,-12,-88,19,-9,85,91,-26,103,39,92,116,88,-87,33,-43,120,-68,-87,-53,84,-99,-28,96,-59,3,48,12,-18,87,21,-88,86,-56,-36,63,33,-80,-97,-93,116,-36,-38,100,-65,-62,-87,66,-65,102,104,85,73,60,-96,77,103,-80,-70,-99,103,-6,-67,1,-1,-81,66,-80,93,17,-58,-44,90,63,-35,-59,39,-56,-49,83,71,29,-7,-111,92,-114,-75,-80,-54,56,-107,-7,-48,21,54,-124,-3,80,-49,-13,61,-115,-29,-60,-78,96,-105,-110,123,112,-68,126,-87,53,22,70,16,-40,-90,-74,82,-16,29,-70,-84,-47,14,-117,-3,52,23,64,-84,74,-37,6,-13,-57,108,87,-100,59,82,45,87,2,-39,52,57,-79,84,20,-65,-33,78,-96,-61,-61,63,34,37,-16,-19,12,101,-119,-97,27,-13,21,59,32,9,57,-124,127,6,-105,118,80,-31,89,98,76,83,56,85,27,102,16,-57,68,3,-26,5,-95,-77,23,-110,6,58,-21,-113,-78,26,90,-16,35,-23,46,58,-14,102,-117,80,-108,-47,10,83,-42,119,-49,-38,-58,25,-100,-80,40,-54,-122,-45,80,-85,-77,87,-2,-35,-94,-115,63,86,111,-75,-47,-114,-47,-35,-10,84,71,-111,101,123,43,-99,-22,106,95,-17,-94,111,96,10,-3,-89,104,71,22,-52,7,-99,-90,32,-11,106,-7,-112,78,99,-38,-81,-104,-30,30,-16,-110,30,-31,-125,-113,95,-19,-50,-86,-66,111,-50,26,-74,-66,109,4,70,-4,-14,-30,-78,-83,48,-105,-45,-2,-86,-2,102,118,-62,83,37,58,53,-112,89,46,-25,75,22,100,-66,49,95,-104,125,88,19,-76,-35,-40,-83,20,54,-106,116,101,39,-106,32,-82,61,-80,-52,-45,-86,39,103,-71,108,121,120,-126,-56,-24,71,52,70,117,9,5,110,-39,-56,-97,-79,77,71,-90,-97,3,-8,-64,-102,-99,-6,59,-100,115,112,-5,105,-7,85,-76,-65,14,118,65,10,23,24,68,69,68,-78,-60,116,13,40,-83,-118,-2,-43,79,96,-79,-7,-19,-56,-93,-47,-63,-5,96,19,19,94,31,30,22,43,61,121,61,-49,116,-17,89,-104,-41,32,29,-111,121,-109,-51,7,88,16,-80,-105,115,-25,51,-6,-61,91,-84,-41,69,-80,-12,-70,15,39,75,-38,68,40,45,80,-71,62,-22,111,-51,11,-9,44,29,-114,-27,112,105,-68,51,29,-105,68,-106,-95,-109,-13,-82,51,13,-51,-48,-103,54,-91,33,50,-29,17,-65,-46,123,108,-73,-120,123,-52,100,32,-110,-76,43,27,33,-43,-13,52,-79,-30,-86,109,41,0,103,39,10,-57,-90,49,106,-13,-28,-52,124,-15,10,74,52,83,91,-63,95,-23,-124,26,11,-44,114,-48,13,-57,114,-108,-60,99,39,27,-101,117,82,96,30,5,-34,29,-128,-74,-47,-33,-6,-35,-121,-112,-35,109,-118,-69,117,-80,-18,20,-102,24,-33,47,1,-117,101,4,74,-64,-5,-13,-57,-65,-127,25,-107,125,0,-78,27,61,-100,-1,-84,-29,-60,110,-17,-75,-19,-63,-56,-25,21,107,-83,-100,-33,-89,-48,-3,46,88,-121,-55,109,83,29,28,98,-64,92,-29,-65,-63,-26,47,-59,-73,4,65,-86,30,-111,1,-21,26,-88,77,-119,-1,-35,22,-109,-86,75,-54,113,-29,-95,24,-40,127,97,-77,-24,43,-85,69,80,-56,-32,61,125,-18,-105,19,9,65,-2,-18,9,90,2,27,127,10,-15,-57,-76,-37,11,-51,109,28,-55,-63,90,69,48,-13,17,2,-53,125,22,98,44,-96,-94,-116,79,12,-2,72,-11,44,65,88,64,-112,76,61,72,-103,-29,106,-123,-36,91,72,79,92,-24,78,-121,4,-93,74,-28,83,-109,-98,-43,-57,92,98,-23,92,-99,63,10,83,-39,94,50,79,-111,-32,-124,-19,-34,-26,56,60,-79,40,68,-72,91,115,-101,-73,-55,36,-85,3,-86,-73,-113,34,-83,-59,103,10,3,-98,53,-90,112,-114,-101,-1,46,58,-108,-77,-122,26,29,-87,52,51,25,-51,0,32,-61,13,57,67,-108,-50,97,-36,-67,8,117,-124,-59,28,95,-112,-86,-50,105,-54,-108,-111,10,124,53,-1,-127,-43,65,35,-42,-28,12,63,-92,-97,-71,22,-119,-47,-42,10,15,-50,-23,83,-24,-28,3,-42,114,98,120,13,20,69,123,-101,108,29,-36,-44,87,15,77,56,74,-89,-23,65,-12,19,54,66,-31,-16,79,-8,-43,111,-46,-48,-111,109,124,-17,-87,69,15,61,-28,108,118,43,-55,53,74,-102,-72,-58,-88,-54,83,-80,-38,56,116,-80,-66,117,-3,105,82,74,-125,-75,-120,-58,43,88,-5,6,78,-72,-42,4,85,-49,-55,88,-79,-51,90,-33,-100,123,127,60,-115,20,-19,-97,117,9,90,-32,-123,123,-98,-15,-75,122,92,94,-86,41,40,24,106,-60,-39,73,68,93,-91,-86,-41,-80,-120,-27,125,-87,91,-40,-41,-9,5,34,65,-123,-111,2,35,113,83,-66,114,-111,5,60,126,-93,-105,-35,90,57,-68,11,62,-117,-33,51,-52,-45,59,-43,117,36,69,-95,97,83,64,-62,-81,45,110,88,102,-125,1,-51,43,95,43,-22,107,-97,25,-12,-122,4,100,98,-64,94,-21,-37,45,-38,-104,119,64,-74,29,-123,-46,102,-2,-40,115,-31,-8,18,21,-115,27,-80,15,2,74,8,75,82,90,88,10,37,-99,-105,-82,77,110,-49,-104,-1,35,40,80,-97,24,99,-94,43,43,-63,-40,10,64,-3,20,40,-22,77,113,-71,-79,-82,-44,-53,-106,-95,110,-124,-121,25,23,86,104,-96,97,-27,-14,74,54,120,49,-67,-128,-9,-30,-33,72,107,-12,18,-60,21,-91,77,40,38,-12,111,7,-43,36,-15,33,-70,-108,14,-89,44,85,112,-85,-109,-123,-72,57,100,15,-124,-48,98,-111,60,-17,85,11,90,-105,7,-116,-10,91,-10,64,59,-107,-121,54,-128,-98,83,38,64,-25,36,46,20,-96,-108,-71,-1,-17,101,26,126,67,-89,0,77,32,-72,42,-11,44,-14,119,84,-31,-29,-21,95,-8,-74,123,-128,30,27,94,-51,38,-11,45,74,20,-74,-33,-115,-122,41,7,80,35,18,33,16,-6,95,-111,3,-30,-101,15,-59,-92,-69,-67,-86,28,-43,98,38,27,-111,-126,-34,40,68,83,106,-95,-26,86,-54,-102,-110,11,-122,40,-37,30,112,-88,38,-8,-46,46,81,90,-40,95,-61,-109,-110,-123,-44,127,-83,-73,77,81,-23,105,32,81,-55,77,62,115,32,-70,-62,-123,-33,-44,-33,-36,-96,4,52,86,127,86,38,-16,84,21,106,-12,17,43,53,-98,-80,-125,-69,-25,-70,-72,34,6,91,-119,48,22,0,-33,-115,-18,-19,42,-34,46,-92,-27,106,-113,7,78,44,-123,22,-116,35,14,18,50,-110,-112,113,-91,-51,28,109,-83,-51,86,73,-17,88,-64,-114,-19,30,-33,30,-1,-121,-109,86,-58,51,104,89,119,-76,-28,-90,-95,-100,30,-77,-23,-14,-99,55,69,-55,125,72,58,-112,39,67,54,-6,6,76,50,92,89,97,4,52,3,96,-47,-26,126,80,-80,-100,16,53,-119,-36,123,106,-76,67,53,5,58,-13,31,33,-67,111,-42,-16,7,-111,43,51,-27,48,-105,38,23,-110,-17,-12,-98,89,-66,-1,64,118,93,-75,-32,3,-93,-115,65,21,7,-25,126,59,45,-16,-26,14,50,2,107,-19,-110,-34,-107,75,-11,-109,19,-61,54,-115,-63,123,-39,98,125,-94,121,-16,-24,-11,2,77,102,90,-121,116,-55,109,68,6,52,-110,119,65,-119,-47,6,22,103,-121,-32,104,119,-38,-16,-100,49,-117,90,109,-90,124,-92,61,-115,-107,54,-72,93,27,-79,89,60,-26,-77,123,111,-124,-89,-54,-94,108,-119,55,78,-108,95,123,59,-49,42,36,-4,-28,-7,-99,-42,-100,106,59,-65,-24,-100,115,-6,91,-5,-93,32,-77,35,70,-90,-7,-74,77,-20,105,114,49,-6,40,-32,-91,76,-32,-126,-83,-81,84,-103,102,-69,-99,-127,87,113,80,-69,-108,-13,-29,-43,-11,-126,-113,-90,-22,-11,79,-107,77,119,-104,7,-64,62,26,77,-83,24,-90,115,-37,10,-22,-76,-13,52,-57,-52,-63,114,-38,94,-56,-96,78,74,-95,85,-82,99,-66,59,33,-113,-78,-97,10,50,4,32,102,5,-105,-76,-69,-72,-19,69,20,127,94,-57,-26,-117,-7,-38,24,126,-81,86,91,28,35,-91,59,-126,-39,9,-58,124,101,74,120,94,-40,14,-31,26,-5,-90,54,50,-56,-108,80,19,-37,-39,-45,-22,-107,37,53,38,-126,-117,9,-102,-104,83,-73,-125,90,-106,74,109,29,21,-76,-42,-51,-98,72,52,-45,-56,20,51,-1,122,91,-111,-106,-69,55,-108,-93,12,-18,123,11,-3,51,51,96,-100,91,35,62,70,-39,33,-64,-87,-51,-54,-87,15,-81,-125,-111,14,-109,126,126,-36,65,-34,46,-89,70,-119,-49,-122,-47,126,-87,88,-117,62,-89,29,-65,103,100,-107,119,-88,-117,25,-89,9,-36,56,79,9,-95,66,-5,54,-2,95,-124,-95,-93,-126,-9,-54,81,-106,21,69,122,105,-37,-124,98,-25,108,84,39,-9,-97,59,-25,-67,18,-42,3,-105,117,76,79,35,48,-76,-107,78,-75,3,-81,-61,30,-88,-19,101,-118,-67,76,-99,-99,-82,103,-94,112,-71,-105,-24,-91,-26,-110,90,120,62,-116,-20,83,75,41,-7,34,-77,23,109,107,94,-125,74,-78,26,-13,27,99,49,77,-73,100,-115,-36,0,88,123,-65,87,77,-108,-24,93,-23,-60,-63,-44,0,-96,88,-19,89,108,119,19,102,-103,123,69,85,-68,-99,89,11,-60,47,-106,97,-53,94,-56,116,52,-1,-68,6,-55,-107,-3,-9,-59,78,-21,-69,118,107,-105,-3,37,127,-37,18,-117,-79,-43,-108,76,64,-121,-25,-52,68,124,33,-2,27,52,-71,88,14,25,-115,92,110,-36,-16,-82,-21,57,30,-57,-105,63,-75,-72,30,113,-92,22,56,-77,-20,68,98,-20,-15,79,21,-25,106,115,71,32,20,48,15,112,38,-124,48,122,-70,115,47,62,105,-71,-41,-85,127,-35,-21,122,110,30,-70,-6,9,-103,122,-68,-45,42,68,9,83,93,117,110,8,-42,-82,13,105,-26,21,98,-42,27,110,-123,10,109,31,22,29,22,71,-98,-5,7,-91,-112,-32,-56,60,29,-126,92,-7,-64,-77,72,-20,4,63,-54,-128,74,-53,-92,6,-89,-20,-92,106,32,-94,-50,88,52,46,74,22,-119,-90,-69,107,8,3,13,96,-64,28,-59,58,55,-102,97,110,-106,74,83,-95,-49,-106,-26,-93,9,-19,20,-63,87,71,-28,-52,125,26,49,-73,-11,112,72,-117,-65,88,-33,21,14,121,-29,-74,-128,4,102,125,112,-49,12,118,-28,82,97,16,-82,-7,4,121,46,-71,28,85,50,78,63,-94,74,107,-59,-48,-24,76,-112,93,-47,-67,-32,119,84,108,122,-67,-113,-17,33,-63,74,52,23,-10,-96,27,-54,49,57,-103,-125,62,20,102,7,-20,-58,54,20,109,-18,-78,107,31,-85,5,-32,-90,-61,98,6,64,104,81,125,-100,51,125,104,56,126,24,50,22,23,-100,-128,-82,-86,109,-83,30,15,23,123,-89,14,-48,107,-61,-92,-65,-75,49,-82,-36,-124,-36,-12,10,0,-105,26,119,-55,-47,-37,-38,-17,48,101,120,-118,-92,-89,18,-14,-50,-72,112,-105,-41,-106,-114,-5,87,-100,-125,102,-7,126,-23,-25,71,-111,-11,123,50,57,-84,-66,-101,-76,-106,47,-23,39,-28,102,-65,103,32,-14,-125,82,34,28,-18,10,84,-109,79,32,-112,97,38,56,-36,104,68,-78,-80,93,-95,-70,-6,27,41,33,-120,125,90,-18,-97,30,-51,53,-79,-74,92,-33,-102,41,-72,4,-27,-102,28,-56,114,-117,126,121,8,-126,49,122,-105,-56,-127,-51,63,84,30,-76,-13,49,-112,57,3,127,-111,-45,53,41,-71,34,-85,22,-114,-34,38,97,52,-45,44,4,-111,-35,-98,-24,-53,42,74,22,-89,-19,-119,112,-21,-118,-86,119,71,-52,-88,26,52,35,126,21,-51,-110,4,-120,-107,65,117,-8,-72,47,-66,72,85,3,73,-89,-100,-36,-114,-97,87,72,-27,-111,116,19,71,-53,-68,-121,17,45,-83,-28,116,71,-3,-29,-60,-125,-55,-64,11,4,-123,53,42,-24,-37,104,-22,-2,-77,-122,-45,49,91,101,81,44,-72,-64,-100,-107,-51,-26,108,-4,118,-80,-75,-23,-11,-102,19,-18,-18,125,90,-91,102,8,-54,-35,-35,-84,41,-115,-99,30,21,6,24,102,-108,124,28,39,1,-39,9,26,-8,-9,114,-93,76,44,72,-72,-24,-57,127,-3,-58,16,-1,67,-41,29,36,-92,-31,-87,-124,-34,-23,15,-44,-38,-19,-87,-47,57,118,-2,8,51,121,-82,71,-14,-41,-84,-62,79,118,-20,-12,16,48,5,-127,17,-83,28,54,-95,-89,-97,3,-18,40,-21,45,115,124,15,89,-118,-125,-19,23,-58,-1,2,38,-18,-121,-48,81,39,19,-24,-64,127,-46,19,-16,80,-128,55,121,-43,-73,93,56,-37,123,-62,14,36,-127,42,-117,-43,-99,38,-19,-46,-112,-70,-128,24,-79,11,23,-34,-99,-121,-81,-110,88,54,-80,-51,51,83,10,-76,-53,-58,-35,-128,52,20,27,-109,119,24,51,-19,97,37,112,112,38,-65,84,120,67,-8,67,6,-104,-94,-103,118,-1,30,-94,-127,-50,78,10,58,-97,-95,-42,107,-41,21,-88,63,27,-55,-28,-67,-39,-23,-118,-108,91,-1,-9,16,-37,62,46,-80,-82,1,50,-29,-55,48,-41,78,-112,34,12,-53,123,41,-94,37,108,-16,-42,46,1,-123,-50,71,3,8,86,-39,-24,-82,-86,20,22,8,-72,51,119,114,-110,-55,115,-15,74,83,93,93,51,122,3,-125,28,14,59,41,-56,107,-17,-21,38,-59,71,-23,0,111,79,75,113,69,-48,-17,-110,38,-29,87,32,50,4,-41,-56,12,-27,-77,-87,-113,-4,-117,-99,-20,-61,115,-99,40,-99,2,29,26,119,-86,112,-95,-31,4,-21,-102,-53,94,-82,45,-65,75,116,-85,-17,-109,-111,23,-23,-110,1,-97,100,29,80,-90,93,-18,25,95,112,-22,72,74,3,77,-29,-48,-106,-117,94,9,95,97,-109,-104,-124,-94,-29,113,-1,66,33,-28,12,91,-88,-102,77,-16,-116,-65,95,-79,-107,-76,21,78,78,51,54,-51,-123,2,40,-105,14,-90,64,112,124,49,-124,71,-114,97,-3,3,-83,-105,-50,59,-63,94,35,73,120,-43,116,16,-91,-46,-18,123,-97,-26,84,-119,72,-117,-108,-21,-118,-84,75,34,-59,-108,-104,-26,-11,70,63,53,-81,-65,21,-63,-55,-108,-35,-125,-58,-115,-16,126,-72,7,0,-76,-13,-54,59,81,-118,-12,-67,121,5,27,-23,-6,-79,-125,-14,-19,-45,80,87,-56,-118,-85,-37,-43,72,71,-49,-22,116,-121,-90,-59,49,-91,31,46,-62,34,89,-4,12,23,40,26,-7,-54,120,-89,-37,-39,88,42,-18,12,34,67,123,61,-91,46,54,-38,-104,100,-75,74,-36,0,28,15,113,-44,25,-56,103,28,-16,-92,-100,-7,58,28,44,-75,-121,34,-113,38,-99,66,-2,45,17,-19,11,-45,41,-20,-122,-72,38,110,-58,6,64,-86,44,-73,-70,-45,-93,121,53,36,91,-41,52,17,43,-71,-90,14,110,97,-53,36,-75,-32,122,115,29,102,-88,-46,92,53,-39,20,-102,46,-91,117,-26,36,-108,55,-101,-120,85,82,14,101,-81,-26,115,-24,33,-47,18,-108,33,-18,-50,-46,-24,7,-125,-71,41,99,-66,-2,-14,-25,10,-112,-74,47,-43,10,126,117,53,104,-77,-57,-30,10,34,93,69,-116,65,24,81,90,88,115,89,-90,72,43,51,10,-37,55,-12,-4,40,123,-85,-90,123,8,13,109,105,112,64,-16,25,-83,44,-54,-109,99,-74,54,-82,104,-20,64,-37,-3,-17,-72,40,14,-64,89,36,107,124,-84,-74,60,-47,6,-98,-125,63,112,-41,-70,-62,115,-56,30,14,127,52,109,-38,27,-112,76,-65,114,78,26,-53,77,60,-107,-118,-120,24,-74,-96,48,29,49,-15,-9,-115,1,58,-21,104,-117,-91,-109,-89,-26,-84,82,36,116,121,52,-28,-50,-103,-87,-93,-103,93,-108,49,-39,37,-115,38,-37,-28,-2,-37,-26,19,11,-120,-68,14,-107,-49,-41,107,17,24,24,-100,6,-7,46,-122,102,35,-110,93,-53,98,-84,38,65,-8,-6,-99,13,23,-5,-4,24,7,44,86,66,-111,67,-65,19,9,-92,114,34,-26,-43,-61,-11,48,29,58,-57,5,-105,-33,77,0,-41,22,45,-51,-44,-99,20,-61,-49,-20,47,-29,-30,10,-11,104,99,21,-11,57,44,108,-84,122,-15,-67,-104,39,-71,-83,2,14,127,5,3,-87,98,23,-9,104,-110,-79,68,94,95,89,40,107,24,26,-97,77,-111,-100,112,-111,-97,-36,49,-69,-95,31,-96,-45,89,127,-1,31,85,-5,-53,-6,-9,114,-53,-69,-102,16,113,84,-6,62,-73,-15,-18,-44,68,-105,-36,127,12,-27,-28,-42,-86,93,-121,-19,67,51,-31,51,-119,-74,86,-111,32,73,35,18,-19,98,44,-82,-84,-84,-106,70,-45,-60,72,50,-67,-126,-5,-67,113,-89,-62,-23,28,11,38,-2,-14,52,-54,-110,-61,4,70,-35,118,-80,-46,-11,-100,-54,-100,0,39,-70,-124,49,-120,-69,102,39,44,-115,-49,-50,-102,65,59,16,90,69,53,-27,-113,20,-47,-115,-28,39,-19,-19,-114,75,59,127,-94,65,-54,-27,-115,-46,-85,-4,1,-43,127,-98,-21,-74,75,-67,-124,22,27,-42,-27,53,-45,127,36,59,-44,-23,-126,-59,-90,-83,86,99,-86,10,108,-99,-45,91,19,115,110,106,85,-83,-16,-33,122,-86,-120,-87,67,-4,-57,4,11,107,-58,-2,-128,-12,-111,-5,-53,-68,-91,95,-68,85,19,-40,-32,20,10,58,-65,-9,-36,-56,79,37,-64,-12,-33,88,123,94,-124,-62,67,-2,41,35,114,31,-116,-100,-32,86,-17,-81,67,-85,-3,14,45,5,-78,-87,-110,83,47,-65,-121,-120,-114,-9,-19,-7,-33,61,74,-40,26,-9,-21,106,63,-70,117,78,56,76,-121,-77,50,104,-125,-32,-117,80,14,87,30,-59,69,-101,43,-98,-11,-23,-10,125,52,97,-19,-56,-94,-108,-41,-119,-38,24,-42,25,65,-39,18,-126,-4,109,95,99,7,-102,13,96,110,74,-89,15,-3,6,73,61,35,-78,-83,98,106,72,116,-127,82,-15,54,-17,2,88,31,111,-37,-102,-24,69,-7,-57,-6,-62,-39,-79,103,74,113,65,117,-32,37,123,-5,59,-15,68,-121,-78,-65,94,120,104,60,5,117,61,4,-85,-88,-123,68,-65,-101,46,64,-80,69,-19,-57,97,-27,-47,54,84,104,44,-15,125,114,16,-23,-124,-100,-87,36,81,-34,-77,-73,95,-126,-120,-27,-20,29,66,-80,-64,77,105,-100,44,19,-80,-18,-27,27,-92,79,116,12,-18,-15,-71,45,116,-27,14,-4,-88,1,-110,51,-101,-14,-77,-120,60,-40,-26,108,-123,116,111,124,93,-74,87,121,62,-83,1,2,-64,-69,11,-45,-79,110,-55,67,53,27,-79,-74,98,-37,97,99,26,110,-91,43,9,-43,80,-64,20,60,-36,-79,-113,-103,-23,-31,-52,68,-112,-7,94,-30,73,-25,42,-111,87,-63,108,-100,55,-94,-13,-1,-29,-59,38,-16,-85,-80,-11,0,47,96,-110,-62,-17,12,-54,-90,116,-12,-6,-128,-31,-3,-102,103,-11,39,-67,-64,-109,0,64,58,-118,-18,93,95,-87,88,-31,102,104,-62,-36,-61,-105,-26,46,-53,93,-24,-10,-54,121,-22,29,117,-70,82,-124,-103,52,-122,84,-76,-64,7,-118,-6,52,-82,73,121,-65,108,64,80,-27,-44,81,-107,-88,-39,-68,-59,9,65,-73,84,-100,-82,26,-56,35,-66,-15,75,-44,51,-51,-65,-62,-84,-19,-31,51,78,-112,-73,100,82,93,-92,53,61,43,-66,5,-63,31,-69,-38,26,48,127,-30,24,-71,-67,-60,-49,-101,-26,-43,105,10,-127,-55,-37,116,38,-63,-109,3,-67,-42,78,-59,110,-103,-17,10,17,-89,-47,-47,62,-41,-51,-16,-31,-41,77,-122,15,94,-96,-8,68,37,116,61,-123,101,-122,-11,105,109,45,-94,-111,44,-52,-113,-74,-97,42,-99,114,105,122,87,-59,85,-89,11,120,21,-51,30,-109,-128,-10,120,-49,-75,-19,-79,-26,-32,-28,59,28,-44,-22,-113,64,-71,109,-84,-11,55,-55,-105,114,50,-71,-111,77,36,99,-100,80,-26,-64,118,54,42,-121,-128,56,-10,16,-105,30,93,19,-99,-75,-74,-50,85,36,-122,-84,-72,-20,-63,-23,-73,-53,-86,-118,-9,96,75,-39,96,59,90,-127,-106,42,-122,46,12,-18,29,-94,33,-84,108,94,-2,81,-58,-75,85,61,122,-43,22,101,45,94,-115,-100,2,-63,-128,106,-49,5,38,35,-8,110,-50,35,-114,-114,115,54,15,37,20,87,-76,84,-13,48,14,9,-99,-93,43,-55,-82,54,-58,32,-91,112,77,34,23,-40,62,-100,32,84,-3,-100,93,17,66,33,19,82,117,102,101,-33,112,-90,-9,114,-1,-66,-71,-103,-38,-86,-101,38,-89,41,-113,5,-40,45,68,89,123,-107,3,21,50,-75,58,-73,5,-67,-64,89,-117,-78,94,16,36,61,-124,45,51,-18,-18,-119,69,22,97,-55,112,23,88,119,65,-103,-62,-97,19,-15,-47,7,-109,-84,106,-5,73,-41,81,34,33,20,-46,-108,-109,-102,67,-116,81,67,-40,-9,-49,42,-67,-57,-33,-38,-89,10,121,-36,-113,61,28,-94,-67,-28,52,-84,-38,-96,117,-44,-110,-17,-116,-53,-53,-51,29,54,98,-76,18,104,124,10,-36,15,47,117,83,80,34,-62,102,108,91,-112,-116,87,74,-68,55,25,-34,-10,66,51,-47,-123,-67,-122,57,32,-96,-87,76,67,31,1,13,96,-64,-15,-125,-41,-124,-77,99,47,74,-16,36,67,108,3,105,-44,97,44,-53,-4,-9,-120,99,-55,-30,-122,14,8,40,86,-64,-34,118,-65,-23,106,-95,-26,114,89,97,71,-108,-59,-10,10,-60,61,-87,-19,-4,-28,-32,-126,-124,-123,109,120,-107,-1,35,-1,-36,55,-47,3,-17,121,31,103,118,79,127,-55,125,-80,25,-4,21,-32,-19,70,-95,-104,-2,-92,126,90,97,60,41,-78,-24,20,49,-33,-79,121,56,120,-102,-19,100,1,44,77,-8,113,74,-46,-127,-28,46,-64,-12,-13,-15,-105,84,22,86,37,-56,11,89,110,-83,-95,36,-40,-92,19,-17,76,-54,83,4,-107,127,-82,-25,-85,35,33,-111,-72,76,89,-123,107,-98,-96,95,59,75,-103,28,-35,52,-47,77,-76,87,-14,-27,-92,-45,117,67,-13,5,-56,75,-95,-116,-34,91,-81,-35,83,85,123,-43,-38,89,36,-80,10,-112,-73,104,117,43,-106,47,113,51,-53,-84,93,-84,-86,0,-82,36,-128,82,33,11,-118,-33,-6,-122,-64,98,81,-44,-49,-104,44,35,126,-20,-71,-73,-126,46,44,-17,67,-99,-74,-48,66,-38,-63,-62,-25,92,-61,-28,73,49,45,92,48,85,-91,105,-98,-95,-69,-26,-76,108,80,-30,-56,102,47,-70,89,-78,-31,-112,4,-1,6,-118,115,-85,60,-62,36,72,-17,-56,-92,-60,-104,-54,-53,49,-100,-2,-106,-115,24,-56,-106,85,33,54,-60,-8,44,47,5,114,-79,-77,44,-28,-120,41,90,42,74,-57,-90,-16,79,-67,-88,9,106,-81,-120,-57,83,-97,34,7,-107,-92,89,89,71,113,-78,-22,-59,40,33,-58,-32,-85,-50,58,96,-19,70,-31,-39,90,-21,118,66,-125,-104,-90,-42,25,98,-111,102,44,-4,-88,60,-62,79,-81,-35,-117,14,46,86,-47,6,-5,101,-12,-3,-93,43,42,32,-111,99,96,-120,112,-27,65,-6,89,105,-67,35,-41,57,-126,-98,-22,122,50,48,0,-54,-46,71,45,-125,81,101,-128,23,118,22,-29,7,-26,-95,117,-60,25,-126,74,86,-53,-8,-85,-86,-62,-28,124,-39,65,90,54,64,-77,-128,-1,-112,105,-77,-84,-40,123,53,-46,127,-124,13,-5,63,123,-31,-74,-36,-16,-83,101,-124,-24,13,-5,27,13,48,92,-98,-115,-98,-111,-10,-51,102,98,-81,-82,107,-1,-40,-115,97,109,-52,24,-46,109,50,40,-111,43,71,-70,-9,-1,-48,-23,110,-41,34,-13,108,37,45,-28,-4,-10,-50,121,16,-119,-72,-45,-86,18,9,-66,64,-36,33,5,126,48,93,19,11,-62,-13,-125,95,-116,-6,-61,125,-6,67,111,-4,19,2,82,18,48,-1,-54,-66,20,45,-103,15,94,-91,33,-15,-24,119,82,116,15,67,30,111,-106,90,80,124,-104,71,66,120,59,13,-20,-94,-124,65,108,-95,-80,16,-101,-38,-24,14,25,-69,108,83,90,98,-17,-96,-64,-89,-29,-30,-11,52,105,13,53,2,75,-101,99,105,88,-56,72,26,23,-13,122,-98,67,71,-29,87,7,3,-114,58,-122,-70,-9,126,-30,111,69,-16,56,11,103,94,29,-61,7,-32,23,-6,-6,-31,-63,-47,67,41,74,110,57,97,74,5,61,28,-65,43,54,-22,-115,-126,0,5,-29,-83,-3,-79,-54,86,-50,22,21,-93,116,34,68,77,-76,-55,85,-116,-31,44,-115,-34,84,64,-42,-102,-13,43,85,100,-60,44,-102,-54,120,81,-79,-104,103,59,107,-65,-69,89,-44,121,-24,-7,61,51,75,42,-28,70,-110,110,-102,76,117,-28,-67,-12,102,68,-81,18,121,-33,56,-19,-27,-124,-110,115,-46,108,-83,30,4,105,-9,-17,114,61,11,-97,-79,17,0,88,-86,101,7,14,58,-48,62,-42,121,39,-49,-100,-38,56,94,27,119,-20,7,26,-99,-78,64,120,87,-83,-105,108,-44,-56,76,-2,-117,26,21,-3,8,58,-118,-100,50,-13,65,81,-74,-14,-96,67,9,27,-122,-73,102,51,112,-60,-13,-15,127,-83,-40,-51,-81,-120,16,-7,100,-116,83,114,97,59,121,-53,56,-20,-72,55,-9,-39,-43,107,45,49,-102,-64,101,-54,59,-123,-70,106,-126,-75,62,-44,18,-110,-17,24,-44,18,-107,104,43,122,-19,57,-122,-113,25,-119,-40,-90,123,74,-35,-14,-100,102,-22,1,35,-86,107,109,-124,-51,56,-85,-16,-124,-65,-121,109,30,55,82,-23,-21,1,-78,-102,-75,67,-94,-60,46,0,62,37,6,12,-92,48,-104,-96,-39,-84,39,101,3,68,34,26,-110,91,60,25,2,103,-47,-67,77,46,-2,118,43,-85,-107,83,43,16,-71,-7,-55,-52,-23,-23,-82,57,-110,42,-102,-32,32,-70,-75,-14,116,-11,-128,31,-111,75,1,-123,116,-44,-85,71,33,-72,60,38,70,-72,93,114,78,-102,56,79,48,-15,-83,75,-6,-78,-90,-121,-127,112,-35,8,120,25,-92,-112,82,-37,119,-32,-35,58,11,-128,109,69,48,-30,77,-9,-42,-70,-107,-21,-23,-78,-81,30,64,-51,-8,106,95,-109,-123,-40,-78,122,-127,9,81,-15,-43,27,52,-8,88,37,-45,65,118,-92,-62,119,-109,-106,73,127,-96,-115,8,71,46,47,-107,24,53,-125,70,-40,89,115,15,-119,-64,115,-11,-103,41,54,-108,-20,6,104,-67,-8,95,102,-7,55,15,73,-123,-110,90,19,113,-53,-22,13,51,40,37,-83,-113,-103,34,59,-10,-121,-103,-61,87,-26,114,-25,88,-65,-79,-63,-11,113,-62,31,88,25,92,123,31,14,59,-87,23,35,-49,-83,-64,59,53,-72,-42,52,-21,-59,89,-104,109,-22,24,-60,62,3,-109,-1,-21,15,25,-37,91,7,65,-39,61,-117,-34,26,-2,-51,-48,25,24,-15,24,99,62,61,-55,36,50,-32,6,94,-25,-84,29,65,-95,-94,-85,117,86,-30,-81,69,-102,-53,65,-7,0,-66,-5,66,127,-108,-59,-82,-23,-75,-4,29,62,10,41,-55,58,9,123,99,55,-58,-99,-6,65,-128,-121,-70,-67,-28,11,122,-108,-18,-104,-68,78,103,-108,31,119,1,117,-22,61,121,64,-68,-68,-96,118,14,58,11,21,60,52,41,75,-54,-54,-26,-119,-66,-19,11,-126,62,76,-97,64,117,-64,-5,72,-115,-9,81,23,65,73,-87,-91,57,-48,90,54,-11,-121,-40,42,-53,-82,73,6,102,-104,-117,-1,-12,52,-56,59,12,0,70,-103,32,103,104,123,-75,-104,-123,-109,-44,-35,20,24,76,16,31,-50,-63,55,-116,35,-116,-29,16,109,-34,-68,-115,-39,74,-32,-43,-9,126,-56,32,-74,-46,-19,-82,-103,68,32,94,-29,53,-105,-115,-50,-121,17,105,-7,74,77,98,-23,4,37,-8,-103,45,-123,-68,-99,-80,62,-21,-58,-2,-95,5,-14,35,19,-65,-123,-5,58,35,-90,-53,-37,108,28,39,-21,17,24,34,-53,94,101,20,-38,70,-74,14,30,62,46,-61,94,125,-98,80,88,36,14,10,-121,-122,110,80,-127,-97,72,8,95,50,-48,-39,27,54,8,61,4,113,122,52,-124,-117,94,40,-69,-34,23,89,-56,-123,-97,-16,21,7,57,-87,-90,24,-80,63,-50,-118,-112,-94,-17,24,-32,11,76,-25,32,58,90,-4,-12,28,48,118,116,-112,107,61,-110,127,-38,-69,-62,55,92,-104,0,-46,-54,17,-39,53,54,-90,-69,72,-57,116,-32,33,-36,114,37,-70,121,-84,-67,-49,-95,-105,98,60,60,22,-41,55,-74,-7,-57,-51,-107,48,29,-102,-72,-35,79,71,31,48,65,78,-38,-5,-8,-113,122,76,107,112,-31,102,122,-83,90,-55,-128,101,77,-66,-62,111,126,-75,115,63,-118,52,-6,6,101,-55,76,32,68,-128,90,100,-109,98,-58,79,109,114,121,-77,-59,19,-52,95,-1,84,114,-52,56,-13,91,50,-114,67,-51,-94,-115,113,-58,-33,56,-92,-114,-126,80,-125,-29,-82,55,-120,44,22,-85,126,113,-92,91,-39,113,-81,-90,43,69,-59,63,-34,-5,-91,-21,-3,120,-126,127,43,-73,-13,-111,-99,73,37,66,113,55,-7,47,-46,110,-76,68,105,-76,126,-36,10,21,-80,13,94,10,100,108,-127,-117,21,-95,-79,93,7,-72,98,-15,-62,94,77,-124,25,-63,24,84,-99,28,-99,-117,115,-65,62,-40,85,-82,113,37,-125,13,-51,-96,70,31,26,-36,-5,57,43,44,-97,-27,2,-72,106,-15,-112,126,111,-31,-89,69,-106,-114,-111,1,-54,-66,76,56,-70,51,120,105,-56,-8,-92,-102,-104,40,-52,77,-30,-123,-71,76,48,-20,-93,76,53,-113,-16,18,-21,44,-107,-115,53,40,88,95,123,34,53,-28,21,47,82,-90,109,-114,-104,-108,-30,76,-58,73,7,22,-97,-96,89,-84,-47,-75,-62,110,25,42,-62,-46,-62,55,121,-128,-54,69,54,25,-75,-95,-100,87,88,-96,74,7,122,38,-103,-68,-83,-57,109,-34,51,18,95,89,120,-86,15,72,86,-84,101,66,85,-32,48,-104,-99,-92,27,43,76,41,-74,62,115,-5,-8,-14,76,-114,50,-77,-97,85,50,16,-36,-27,-99,-67,-109,16,-68,106,-52,-22,-112,122,-15,-31,126,23,121,16,18,63,64,64,76,23,54,-57,-75,97,-94,-55,87,72,-40,116,-64,-23,-94,-63,-13,-53,30,9,-72,11,-45,-105,62,59,110,20,-7,-90,11,-80,-27,44,28,46,45,57,35,-60,-56,29,-91,-42,115,5,126,10,-115,77,-65,-17,-67,34,12,-39,54,-119,-20,1,107,56,39,-102,108,-66,22,-75,14,-104,-127,-85,-76,-88,103,-94,-102,-87,-17,23,-95,33,-71,107,92,-96,61,75,-10,78,-33,-125,-72,121,-98,32,-14,-28,33,-96,-4,10,-65,61,87,-27,92,-43,110,7,-52,45,9,-71,100,-52,-70,19,45,106,-110,-74,91,-86,-52,-110,-66,58,114,-126,-27,-77,-63,-50,-65,49,-7,33,116,22,-124,67,-54,76,-115,37,64,-105,50,19,-126,19,32,124,-37,80,-93,81,86,-65,-21,-5,-48,-124,-23,-25,24,-79,-117,65,51,14,-77,16,97,80,-50,29,56,-23,87,96,-52,107,-106,2,55,102,-37,125,49,93,-116,13,61,-11,-23,-119,53,13,15,-86,-96,24,-73,-43,-39,15,112,0,19,76,79,-76,99,-29,111,-18,119,-66,-34,-127,90,38,34,63,3,111,31,-29,24,5,65,-95,-70,-15,86,-43,16,76,-127,-120,6,-39,83,97,-31,-99,126,21,-29,-117,-48,53,-57,38,56,-78,67,109,-92,72,-96,-88,36,-18,43,89,94,100,-37,121,112,-33,-69,49,20,112,-80,26,26,-42,-99,5,124,116,-42,-32,-118,-28,22,40,-76,-105,81,97,59,65,13,52,-104,-98,124,82,96,-99,-46,114,-83,-125,-36,81,8,-27,-74,-28,-61,64,-31,-81,-49,42,48,38,-115,12,-80,-86,62,36,-81,-46,93,68,83,-56,-52,-36,7,-8,-125,-80,38,123,122,-88,-85,-94,-81,5,-106,21,-112,45,-37,-120,-28,48,93,-99,-47,116,81,48,-85,-122,32,50,-67,-109,-14,-22,10,10,56,94,-120,78,-79,-20,74,-98,41,-30,110,50,86,11,65,51,43,-97,-31,74,91,-11,127,-86,-44,-24,119,-16,-66,-127,-30,-95,-64,-11,54,-73,87,45,24,109,98,61,76,109,126,28,114,-1,64,-103,122,24,45,-113,-32,-24,-28,-125,95,102,-7,109,-9,-28,-7,73,-41,-33,-25,111,-45,-101,63,-111,-48,-70,-113,33,-53,-32,-95,75,71,-40,28,-112,-106,-41,76,117,-94,81,19,40,85,96,125,36,-91,19,53,6,65,-9,-82,68,59,9,91,-25,-107,-34,65,-122,20,65,-67,-38,-106,121,125,-83,109,45,-103,-57,49,-42,-42,41,78,122,-31,-69,27,84,23,-116,3,-65,59,37,113,-101,-91,-51,-19,-28,-52,86,119,-29,-29,-104,-84,42,90,119,126,-32,37,-37,59,-113,125,11,-13,65,-21,-49,-80,60,90,4,58,-117,-84,106,-77,-114,7,69,-93,-22,-50,110,-46,125,78,-60,-59,-20,-42,-5,6,93,-124,-52,80,73,75,-105,-14,-58,-59,76,105,59,-46,-79,-81,-72,34,-8,-49,-96,-102,-47,-94,93,-100,69,-126,-115,-102,-103,91,77,-119,107,-86,-115,-68,83,-26,-42,73,-28,22,5,-85,-126,-43,-84,-54,100,-71,-104,-61,97,-128,38,88,-119,36,94,-84,107,87,41,112,-115,60,39,-55,1,-45,-114,-9,-111,-96,-105,-67,-103,-24,-80,88,95,-113,-91,90,-70,91,-113,-70,37,-105,-92,-20,82,81,-122,-83,-10,126,121,117,89,-2,-118,36,-6,118,-85,124,-5,-113,-21,-9,-45,-33,-103,65,122,124,87,58,88,-17,-43,54,94,-106,-30,-47,44,29,-10,-116,-59,41,54,-86,95,13,-116,106,72,55,101,98,-29,-103,-12,-12,-73,6,122,-106,-101,69,54,-93,-43,31,124,79,-72,-102,17,7,71,-44,92,37,127,54,28,-104,-7,-50,-74,-35,-125,-16,-119,28,-23,82,122,63,122,-38,-17,-44,14,-28,117,92,-90,26,88,-74,-41,-104,115,111,112,37,22,127,-9,31,-128,61,29,53,-3,58,78,92,66,-76,39,110,52,-27,-33,-125,-73,27,95,-96,-61,-125,114,47,-107,101,124,21,-16,80,-101,-47,44,63,-31,-99,-57,24,-113,37,18,121,102,-10,46,-24,-76,-71,-104,68,59,-124,112,123,-82,49,78,-17,-47,-83,121,91,2,102,-14,32,-30,-19,-3,67,117,-111,41,-92,26,-26,-50,-42,-74,97,-21,-72,18,-78,104,41,64,-111,122,108,43,-80,67,48,-45,-45,-19,105,-66,115,84,81,125,72,59,60,105,52,-36,-31,30,-64,28,-10,45,-74,11,38,40,70,-3,-46,-77,-70,-16,-118,-69,-114,98,-77,60,123,83,-102,115,7,100,109,-22,-48,-80,42,-127,-87,81,-77,8,57,-72,-41,103,-54,3,-54,105,-37,-41,-9,-16,118,80,-30,-87,22,71,-48,-38,-105,62,-90,-21,-41,-33,121,22,19,116,66,83,112,-39,-28,54,-84,31,-125,112,89,-81,-109,72,-108,-95,-1,-114,120,-73,110,-105,-107,-126,-93,8,-103,20,-55,65,122,-58,68,121,-97,61,-74,57,69,-65,1,-112,94,97,99,-122,100,46,7,-94,116,23,85,-111,83,79,-108,112,-102,106,-105,-87,-66,-128,39,24,-7,-72,-78,115,-51,99,-113,83,-90,-97,-8,89,-88,-114,79,28,56,113,-102,38,-5,-104,-76,-18,38,57,40,-67,-9,89,-8,-121,27,-25,-110,-93,-36,-10,123,-73,-111,-29,3,116,-20,16,-40,-18,87,-123,120,-68,-97,-97,-47,-94,114,113,-121,-111,-53,69,105,-81,77,92,-37,-25,-46,-18,-9,-86,54,46,-80,27,-101,108,-69,53,-109,-44,85,79,-46,-87,34,-30,85,-11,-61,101,-22,-17,-25,99,-65,-30,117,-89,-120,-23,-16,1,-94,12,-80,-29,64,54,106,-111,-75,82,-3,22,-46,11,-103,-63,12,68,120,-17,-117,-52,87,112,-123,-52,-121,105,-53,-55,101,60,-3,71,-122,52,-9,-125,-41,56,-1,85,15,-72,-29,70,-7,-103,-46,-112,127,34,11,4,48,114,56,-109,-32,86,11,89,-1,-80,-18,17,9,-55,-87,114,92,53,-4,42,86,22,57,-50,120,90,110,-90,15,67,-59,49,-46,-97,96,119,100,-80,64,-54,81,126,92,43,-90,-14,-47,-89,21,-17,-37,51,121,-73,-43,110,-54,-30,121,40,-34,85,52,-99,36,-9,-18,-51,91,-71,86,102,-116,95,-55,95,-35,74,118,101,-114,55,-108,-48,-60,-22,20,87,20,49,74,117,-76,-43,41,79,114,-28,83,-68,43,-128,-19,-96,-12,19,111,-44,126,102,-110,56,-77,-27,-14,17,-26,62,-107,71,89,-127,-37,-16,32,-34,126,110,74,107,126,85,8,80,29,104,6,30,-52,79,-74,-11,108,65,29,-107,62,-2,59,-123,71,-128,109,110,110,123,28,-68,-39,-20,-108,112,-32,-36,-12,98,-82,-57,38,-103,55,126,100,-5,89,-41,36,12,-16,99,118,71,-96,88,-92,113,88,-56,97,76,-77,117,60,46,0,23,-41,69,4,-5,-84,33,-3,45,31,38,-119,-20,96,-113,36,28,-38,-96,-23,-115,-50,-106,3,-9,85,-80,7,-19,-111,-120,-3,-107,116,-87,-115,101,92,5,-13,-9,53,1,-35,-125,-23,-107,-122,53,117,-10,-122,-89,19,-33,-32,69,-67,-69,75,-116,-35,107,-48,-74,109,-38,50,-69,43,-85,52,-107,18,83,115,-101,5,44,78,-7,99,105,-72,-39,62,31,27,-46,97,-117,-94,-69,-86,-124,-114,-30,-48,-126,-122,108,-59,-2,-19,49,-22,-29,-21,67,60,37,-75,-55,-22,56,47,15,-111,32,0,35,81,-18,108,41,-120,-20,125,-4,51,119,-115,0,122,78,77,95,-68,-9,109,59,-128,-8,11,-114,7,29,-56,79,-124,-80,-112,9,91,-32,11,-50,29,-115,18,-19,-6,-123,-15,-82,74,-6,15,-55,12,72,-62,12,43,-30,58,-30,2,-56,-100,1,82,-85,63,-17,26,-117,52,-90,-69,-61,-90,121,111,-18,60,7,-26,96,63,-92,5,-11,-52,-81,125,97,122,67,82,33,93,99,25,51,39,-71,110,28,-116,123,48,-68,-103,-9,-31,48,-2,-107,-64,-102,-107,92,-62,-100,83,127,41,58,-122,-7,113,-18,20,-82,-105,23,84,-120,10,-37,-82,11,46,62,-57,16,-58,-18,0,42,-95,-82,39,-105,-78,106,52,-51,36,-40,-3,98,-108,45,121,-59,76,73,19,124,-67,-45,20,76,-21,66,-56,46,-18,-39,90,0,-57,-42,-47,90,79,-120,79,103,34,59,-41,-67,94,125,88,-104,-30,25,-128,120,35,88,68,-48,-47,-99,66,-12,92,-42,46,-25,-10,55,118,125,20,114,67,-9,37,123,48,-84,79,-63,-23,43,119,82,76,-8,-21,-17,27,-108,97,-32,-119,-109,68,80,-9,53,95,-20,-71,41,-50,-57,-16,-4,17,39,-128,19,-113,9,30,-36,66,23,47,82,-76,-87,-35,-48,96,-4,-86,100,15,-58,-10,-1,83,-52,17,-102,37,-89,-33,-2,-23,60,122,-88,-13,-112,-47,-92,-52,28,-101,-99,92,-123,-108,77,101,102,44,-67,-88,-108,-43,118,-96,45,-48,84,-25,-9,59,86,-7,79,23,110,-74,-92,-67,50,-109,29,53,-57,-89,31,8,1,65,126,-119,73,9,-107,92,81,17,53,52,98,-126,111,22,15,-15,-110,-49,60,-82,-82,88,79,110,-113,-124,-127,-51,45,41,-87,-17,-95,-122,88,-48,64,-111,-55,62,-46,-91,116,-55,29,-36,75,95,-56,-100,-125,103,-115,-41,-29,-56,88,-81,-33,29,-127,-6,-90,77,-4,30,-81,-11,-121,30,-17,-10,-24,-124,109,67,126,-109,-57,34,-101,-9,112,25,126,-47,4,79,-38,117,-76,-43,56,-15,-86,85,-80,3,37,-120,39,-40,54,-70,26,-64,-45,-69,-53,19,70,24,-112,-78,-35,-120,69,-113,-97,-29,-53,-106,-74,-61,58,-21,-57,97,-97,-16,94,78,62,-121,-58,46,-38,35,35,-127,-17,30,2,54,30,117,-120,125,9,-20,-30,-44,-53,52,29,95,-66,122,60,-29,-113,68,-92,16,-110,10,102,54,-78,-120,-71,111,-52,107,9,-11,-9,81,-96,-37,-25,-77,39,111,28,0,-55,43,23,-98,-37,-123,-11,-42,-98,-97,102,106,69,-4,98,5,115,-121,-115,-94,-78,-69,-9,51,-84,-86,3,-104,11,34,-38,-113,29,-39,61,10,54,-116,65,-91,83,86,27,-44,-27,-108,-86,34,-40,99,-8,37,101,126,102,126,38,-14,-102,-52,-82,-56,-36,74,95,113,-115,-49,-66,-20,-123,20,-83,-37,96,-44,-55,-98,-1,75,-2,10,74,-55,107,87,41,-123,-90,-61,0,2,94,-63,-103,-85,-13,-107,98,78,-47,6,26,8,-39,36,-119,52,-21,-70,-40,72,117,115,-87,83,-57,-60,127,-78,-78,76,36,54,43,-25,127,19,98,125,-96,20,121,62,-126,13,-30,86,-110,97,124,-32,-104,6,-122,36,0,18,105,-48,-39,20,-105,55,-113,-114,-121,-83,9,-20,-23,-49,86,-48,-107,70,125,-114,-115,83,31,-23,121,-30,-67,48,-86,-90,-91,69,-79,-107,-77,99,21,83,54,-73,64,-60,88,-10,15,57,112,-85,-47,101,-78,7,-29,-128,120,-16,-96,-50,27,116,-128,-11,-35,84,-19,-33,-57,-73,18,49,-67,-15,41,15,36,41,15,9,33,4,39,27,101,-117,77,83,115,-60,-54,-82,46,-56,-18,100,-51,-41,-27,-25,-95,9,74,126,126,-81,-48,10,-60,85,99,80,27,108,-6,-16,77,44,46,114,-26,20,-69,15,28,-121,107,-59,125,-125,92,98,-61,84,-114,-87,-44,-13,116,-120,1,121,-84,-86,26,43,-55,94,-25,-80,-75,34,-97,-12,31,-58,-68,110,2,-109,-27,13,75,84,-21,92,12,-61,-117,36,21,107,22,-61,80,87,-115,29,-3,-125,41,75,45,-108,-29,33,-111,-4,25,-52,8,24,-74,-36,-22,-94,25,-7,97,-124,108,-114,12,3,-10,96,75,34,17,114,-32,84,84,12,-60,-88,-119,-41,41,-48,-11,-25,1,21,10,-71,-3,-16,96,-36,-14,-115,-14,-3,-83,6,-33,70,-18,-108,-81,-31,85,-91,-59,-80,81,36,11,19,74,-22,-80,61,8,57,-110,97,107,91,-40,-82,29,-95,122,-114,-102,-77,-28,111,122,46,-35,-102,123,83,18,-47,-24,-121,-120,114,-93,22,-66,65,113,77,86,82,115,-82,117,28,-78,76,27,79,-128,119,-10,-71,-31,11,-89,-82,-88,63,-99,94,87,124,76,-124,101,-53,-3,-119,9,-50,-29,92,58,-74,-51,57,-114,31,-75,113,-47,-103,4,12,-43,-100,-70,27,40,-81,-36,-26,-12,-102,-118,-88,50,-73,-57,124,-94,122,70,-87,28,-113,-126,100,-1,4,62,7,-91,-91,44,-90,-56,102,-32,30,100,-102,-47,24,34,118,-99,-98,36,113,117,3,-126,-84,97,-73,-124,11,-46,-18,-15,72,-38,24,-47,-4,-65,-73,-86,-112,-37,-125,109,-50,112,72,88,-97,20,-29,-43,-2,-48,121,94,58,103,52,51,-16,-116,94,119,-101,64,48,51,-70,-106,-62,41,82,-66,78,-113,106,71,-105,-44,111,-78,71,115,-50,-111,-46,33,88,-67,-58,-123,4,-82,-34,22,-40,120,-28,-18,-52,10,-15,-109,11,-106,125,-126,-31,94,-89,84,-94,-62,-6,98,62,-50,-78,-34,12,104,50,-39,-11,-60,43,12,-18,36,-62,-58,-36,43,-118,-88,78,-35,-62,-14,-104,-124,-68,21,-18,52,102,18,87,98,-2,-78,29,37,80,25,-106,-99,-86,74,127,6,-31,86,112,35,3,121,-126,-78,114,77,-51,-85,-24,70,7,-109,-25,-58,120,10,-20,26,-100,-18,120,-127,-78,-23,14,8,-116,42,-75,79,44,119,103,102,69,22,26,60,-58,28,-70,-104,25,25,124,3,-15,-44,93,87,-23,-8,-15,-11,10,7,9,120,-68,125,-79,-70,15,115,-75,-90,-5,127,108,108,-66,-122,74,-82,-14,-100,4,58,-106,-96,-65,1,11,102,-41,66,-117,55,-8,6,-69,-72,75,76,16,78,59,-2,-10,-42,-72,-1,-31,-100,113,26,-66,48,-4,103,57,71,-94,-2,14,-28,-36,22,-8,-25,39,-51,25,99,91,70,63,11,-124,69,46,-34,-21,99,-70,-110,-90,32,116,34,-74,82,43,-104,-56,31,-117,-43,67,12,-72,115,-84,-62,-9,21,-30,105,82,94,86,12,40,-47,-39,40,-114,-67,-89,-72,-64,-62,-124,-105,32,95,-124,-41,-14,48,26,8,-116,-57,24,-45,-45,-75,-40,-111,-118,107,116,66,-97,-57,-79,-96,-85,-55,49,-55,-32,-87,-76,-12,42,-85,85,-16,75,-41,-112,49,-29,-28,-124,-10,-60,62,-2,-112,15,-36,-33,81,-95,117,120,51,99,-64,30,11,106,-21,-42,43,-59,51,117,12,45,3,-116,110,88,104,60,67,102,-74,108,80,-58,-108,28,38,-108,16,63,100,-24,-36,-1,70,97,7,32,118,-112,-122,-31,-36,106,10,115,-89,35,58,-15,-5,63,19,-123,-99,-11,-94,108,-18,-13,70,-12,-1,126,-15,-9,-25,113,111,66,-59,81,-88,-114,97,-121,-76,16,8,72,62,3,-107,106,-43,92,-91,63,60,-90,-61,96,-9,93,-24,-17,-22,38,-24,29,-27,-36,-25,117,99,-10,76,66,-77,-71,33,-87,100,48,-13,-122,-49,56,-104,72,72,-84,103,72,115,-10,45,19,-22,52,-97,-77,-107,50,-81,-93,-79,102,-71,46,73,6,-21,-52,5,-96,32,112,15,-44,-4,110,5,-26,-85,89,-87,35,73,-17,59,-95,-5,-123,94,127,-83,9,-122,-64,-58,-72,-111,33,-91,-82,56,63,1,6,-67,-106,-55,26,-12,-105,-32,115,-38,-95,118,117,67,-17,95,99,120,-75,2,28,-113,-105,117,-15,111,22,-46,116,25,-91,40,44,84,37,-4,-66,-125,15,69,-14,49,-12,-11,87,-68,20,91,110,117,125,-65,-34,-36,84,-29,-87,-27,60,-66,-118,-125,49,69,81,54,7,-119,53,-23,-60,-9,22,-116,-125,-58} + +#define IP4_q7_q15_WEIGHT {18,-44,-12,78,104,61,-34,92,-120,40,-75,-19,29,-56,-80,21,60,107,-92,-118,58,94,-104,47,62,11,106,-105,-6,-32,-20,24,43,-116,43,48,53,-50,-86,-38,-108,0,-80,-73,-5,-26,115,111,78,-101,76,-55,94,-61,39,118,94,-20,13,-81,100,-111,70,94,-125,71,63,-121,-70,-14,-69,-74,54,60,-121,107,-121,51,-106,-38,-61,110,26,103,-43,-116,94,111,60,-28,-125,88,83,62,120,-39,-79,-85,112,34,121,-121,-93,97,-45,-90,-97,12,-97,109,90,-45,-59,-105,-100,-21,0,-122,-26,-37,28,-10,35,-115,-87,-62,6,108,-15,118,26,-84,-26,-74,1,73,-41,97,-65,86,94,34,67,59,-99,-67,106,-80,-26,-21,-71,-20,115,-43,109,-107,-21,37,64,-2,-20,115,-75,108,53,-102,35,45,83,-49,-106,-59,-46,121,-102,-41,51,22,-55,19,-58,-116,-103,80,25,122,-126,-76,-7,-2,-34,110,15,82,-46,-16,15,-52,-19,-39,-73,93,62,67,117,62,-27,-12,-89,-100,-15,-57,59,-127,20,52,-37,-41,-79,-43,111,99,-31,13,-12,99,43,-1,-31,124,43,-15,-30,-69,120,-79,-36,-89,-19,89,46,54,116,-46,49,85,94,67,113,24,11,-59,-17,-119,119,110,-57,-1,-81,77,32,-38,118,-13,113,-94,-53,111,110,-14,-19,-53,4,-20,117,-35,121,-97,24,119,18,108,-31,54,30,-121,-74,16,101,3,65,107,-12,14,-38,-53,125,-59,60,17,52,-65,21,-118,76,-112,91,106,-38,26,98,-4,-53,-108,-63,95,-58,19,63,111,-74,37,73,63,-115,-44,-84,22,-47,60,-51,9,29,-57,22,81,-87,-65,-27,-63,-93,110,63,-26,-126,7,-12,-118,-127,-70,-113,45,107,-69,103,-48,56,55,25,-55,79,111,113,120,-2,108,43,-122,-41,40,93,44,88,-78,107,-34,124,63,122,-67,29,24,14,-69,-72,108,67,26,116,90,88,-48,93,-37,-103,127,-24,-76,115,-80,-97,96,-61,-54,-22,-123,-14,-49,62,-1,-17,21,-65,10,116,113,10,88,30,-24,-119,89,-95,58,124,-112,-119,-115,88,119,57,68,-17,-27,31,-9,-64,-26,18,109,-60,59,4,-89,-127,-35,8,-90,88,22,-76,109,-123,88,-51,-90,18,45,25,47,-80,-66,75,-24,-109,-42,-47,68,-8,78,-98,-122,19,-72,33,94,2,-84,-109,82,102,55,71,-121,19,76,76,93,66,-23,-42,-2,40,106,3,123,-111,83,8,105,117,-52,121,2,-4,-18,-4,-19,-125,80,38,83,25,123,-64,47,36,29,105,-71,-72,-41,-127,-82,31,-43,3,9,73,91,124,-3,-99,101,-27,77,-51,60,-96,15,74,35,54,-119,116,-4,53,46,-29,2,8,93,75,38,-18,49,40,-30,30,22,97,-8,97,-35,-111,-62,21,97,-96,82,-12,28,-118,-12,87,29,-16,110,46,8,95,40,58,41,29,-58,105,-108,-29,36,-117,106,-118,-124,11,60,84,-87,-83,21,53,125,-31,-5,114,93,-75,-41,-127,49,-98,31,96,-112,64,60,-126,69,2,-73,94,-100,-23,81,-115,94,-116,-25,-44,91,46,-89,12,75,-47,107,-77,-10,-82,79,-70,75,-106,-1,62,-69,104,-7,-41,53,73,-32,74,-113,26,111,-115,66,-55,20,-91,-47,7,51,-96,121,126,-75,63,-23,81,14,-124,-39,-41,-13,14,16,-27,-56,-48,-84,-43,120,33,98,41,26,-6,15,18,8,31,-50,-9,121,-107,-33,-106,-46,64,127,-19,-104,-59,-30,86,-121,60,39,-79,-38,-5,-119,85,-17,21,44,-120,-22,89,73,-17,-102,49,-73,26,-69,91,-36,-71,103,63,125,-8,61,103,-20,-116,11,105,15,-116,-78,-122,-62,-80,-80,-58,-119,65,-47,99,-111,-26,69,87,-15,-38,-44,-87,-84,-14,-37,-27,-90,109,-72,-4,38,-110,82,-97,29,-50,61,52,-87,-44,8,63,92,83,109,-124,69,-47,-110,-70,-10,111,25,15,80,104,66,32,-16,-70,-49,-52,-41,-16,122,104,-31,22,-109,18,102,62,125,-123,121,74,5,92,-90,-92,72,-61,-2,98,-125,-81,109,101,-120,60,10,58,53,94,-25,38,-56,-13,80,-80,-13,45,-43,-77,-44,-37,46,-62,38,-103,-93,-124,48,76,1,-82,73,74,63,67,-59,-26,116,76,66,70,-30,-113,106,109,75,25,-18,25,85,25,-83,81,-50,78,99,-53,-68,-125,44,-104,-44,96,-126,124,112,33,-75,-29,-60,-9,-126,-84,-61,-119,-127,-6,-26,-46,-57,118,-4,105,21,-120,-121,54,-35,-70,-124,-101,-79,-33,105,-30,57,-108,-111,-48,-65,-108,77,41,112,111,68,118,0,22,44,110,56,-91,-111,-49,62,-54,83,78,66,38,-14,102,41,52,-94,14,106,105,27,24,53,-40,60,-70,-119,56,68,-95,69,59,-124,-101,-25,-119,102,-45,-55,-38,57,61,104,-96,122,88,99,-122,106,77,122,33,-5,126,-74,46,-52,116,-51,-101,74,74,2,-3,-38,-21,68,-30,96,17,71,-124,47,-23,64,-35,107,24,49,41,-50,-23,88,19,-30,55,-91,3,-14,-54,125,10,-96,84,100,100,-116,67,-40,-124,53,2,-62,45,21,72,82,10,-126,-47,54,-84,13,-50,-2,-66,103,-1,96,-17,59,123,-111,-61,-20,-70,-57,54,-110,-94,-125,3,14,-101,-128,-86,-44,80,-94,37,123,113,-104,-9,109,-87,111,120,-7,33,-62,-51,49,-57,-71,3,-49,18,-94,-32,40,-92,-52,3,105,52,108,123,1,40,2,-86,-104,38,52,-93,-73,-44,-62,91,5,-88,-91,-61,-40,-24,-30,-48,114,-115,62,-128,-93,-85,-43,104,102,-20,-103,-52,25,-56,-103,49,10,-25,84,-52,-94,51,-110,26,1,-108,30,32,126,-23,-112,-82,-102,86,-17,-108,78,-32,32,80,-112,-125,91,8,24,-69,-95,-86,-115,-73,14,9,-121,-2,101,-109,1,-72,54,84,25,-36,95,-49,-110,108,4,24,66,126,-63,56,99,-8,-10,-80,5,-73,72,-103,-35,-10,78,3,-61,42,-83,-115,84,-99,78,20,-66,30,-88,97,-66,-120,120,-46,-57,-29,118,15,-110,-94,-29,25,113,89,-110,-52,-92,90,105,-30,92,48,-44,-1,-96,-39,118,115,-3,37,15,-1,64,-2,81,57,24,-47,-14,89,48,-103,-127,-95,-114,-100,14,-69,-32,-82,-9,-77,33,-38,-76,-63,51,-32,69,-8,-75,26,80,59,-31,101,40,-37,76,-23,-110,-23,-84,-83,111,-31,122,124,-56,-67,4,-112,-123,65,101,67,12,-23,-43,-12,54,-87,66,35,-89,-47,55,-105,100,19,21,-80,-76,-85,-61,-117,19,107,42,-71,86,-9,33,-80,-65,120,-49,106,77,-34,-50,-38,-27,21,65,-28,97,108,42,-77,120,69,127,24,-20,89,-66,112,-126,-110,43,103,0,-63,-17,28,36,-43,-117,-68,115,-69,107,70,2,94,9,95,-83,-99,53,47,80,-105,-27,28,119,59,95,82,-94,-16,15,-49,-122,16,17,-89,64,-6,4,88,21,47,50,-78,-25,121,-47,-36,72,-21,29,-101,9,-83,-113,28,-68,23,-67,115,-101,-101,-98,102,-124,-98,-24,-89,82,-28,-89,40,125,23,97,83,-53,-7,-90,-108,-83,-113,-58,-26,-119,28,35,97,-74,6,-40,-15,-10,11,79,-98,101,101,8,-72,-99,117,-65,80,127,95,60,15,-29,2,60,-92,-118,-116,79,46,-79,-62,104,-43,73,107,-43,117,-127,-67,44,113,-41,67,-73,-98,26,74,-111,59,79,45,-60,21,-26,18,54,-72,-70,-30,114,10,-82,-124,-52,-126,-97,108,-19,120,-111,-52,10,102,18,99,49,-128,-17,91,83,-46,-76,-3,45,-41,47,-72,-19,3,112,-104,14,122,-77,-35,121,-23,41,-123,-60,-2,50,44,-45,84,69,-58,43,-69,-98,-11,112,-17,-95,-36,67,-69,-52,-11,98,-45,-126,-33,51,81,101,-38,68,67,-37,-78,107,12,105,75,-109,-100,-55,0,45,11,-24,3,-70,54,77,-63,52,125,93,-16,-97,-22,35,97,46,58,-61,66,-61,-98,12,-43,-45,-63,-36,-79,-58,41,54,-49,-63,48,-33,-110,-36,-49,93,73,-33,-78,50,-76,-48,-6,4,-87,-81,-88,-30,-33,10,-109,104,-94,38,94,-124,30,102,6,37,97,73,56,-106,-18,70,84,4,-31,-90,-27,54,63,10,50,-18,-113,-116,125,-86,-119,33,64,26,-128,-77,-25,76,-127,0,-79,60,-65,-63,5,-5,101,69,-91,-49,67,121,71,-22,59,26,-87,66,-26,-79,7,-73,-51,-114,0,-22,40,-87,-115,29,-18,-72,-23,-96,-55,69,-119,68,-102,124,-99,16,74,5,-34,87,120,-6,-28,-92,-111,-85,-42,-36,123,-52,-86,83,-77,43,-15,124,59,103,-81,96,-80,0,41,-62,-22,77,-13,-99,71,104,-121,72,43,4,107,80,-62,-98,54,-63,-13,10,-92,-119,-95,-90,-76,76,78,-108,95,-117,122,88,-115,52,-10,122,26,39,101,12,-80,107,-108,-13,36,-72,36,63,82,119,-57,-7,-44,77,-55,-54,-25,102,-118,-91,-93,58,11,-30,11,80,-62,111,-77,3,105,-63,39,-50,-33,29,-6,52,-98,51,-80,-5,-50,93,-122,116,-77,79,-45,110,-103,-123,-20,-16,-58,-101,93,-11,57,44,24,-60,-118,32,64,80,3,107,-25,60,126,-90,124,-22,-95,-57,-91,83,-46,-28,1,78,-47,15,74,42,26,42,113,-76,14,33,20,-93,37,89,107,-22,16,-16,23,60,108,74,-117,111,52,-97,78,53,-127,9,123,-78,-15,86,-17,5,-17,28,-120,-76,69,-76,13,120,-64,-17,-35,20,-98,-42,126,-88,-99,-113,10,44,84,-35,115,18,81,99,2,-82,74,12,-125,110,55,31,-110,-94,23,-4,62,-62,-122,40,-120,42,110,84,34,2,-3,-75,-24,-10,124,-46,-38,-14,-11,57,109,27,111,-99,6,27,126,41,72,-29,106,96,-24,96,60,42,-18,-104,82,-69,53,15,92,127,-79,-70,-102,102,-53,79,32,-119,84,115,-36,-84,7,-24,2,-77,103,54,60,-7,1,-64,-7,114,-22,-5,19,-49,80,107,-7,89,-2,-63,-26,-51,-111,17,-108,9,-40,-51,58,108,-55,-68,-117,-51,99,-117,-17,-33,46,69,13,4,-23,-71,-110,-95,4,119,103,31,-30,23,76,-36,39,6,-117,6,76,80,106,-124,18,-3,78,3,112,40,23,-100,-55,75,-118,-52,-16,18,69,-91,-77,126,-87,103,41,-127,7,106,105,77,-23,50,72,75,-16,126,-19,112,67,-102,-4,-56,53,-72,38,-60,-69,0,30,47,-95,53,100,-127,-16,-16,-18,29,46,90,73,-112,-97,-15,-111,-38,23,45,44,115,-93,-32,-68,-10,86,69,19,32,-104,97,-112,60,64,61,87,69,55,-4,-92,-77,-28,-82,76,56,123,-105,52,-38,-1,80,81,-40,-14,115,-78,32,-59,-115,-123,50,3,-14,69,5,-39,-124,70,34,61,-57,-35,34,127,-13,-120,109,-108,-22,68,-125,81,35,89,-21,88,107,87,-32,110,-19,-27,-82,-114,99,-81,115,-54,90,-92,65,-126,64,26,-114,36,-93,70,10,-94,-90,-111,118,-45,-121,-3,106,80,-101,10,-25,-12,39,-72,114,47,125,43,33,88,-81,-109,10,98,-98,28,105,96,-43,123,-58,-115,-88,-122,85,-80,91,26,-26,103,-121,-88,-66,101,-88,87,125,20,-62,-58,-46,-113,-36,-100,93,79,-108,33,49,-45,-19,0,70,103,-19,-48,-15,29,40,122,121,118,86,102,-83,111,-26,-86,-124,6,49,86,50,-67,-28,-104,-28,35,42,52,-25,-87,-70,-6,18,126,-128,123,-3,-109,-94,-49,-120,-62,-89,62,-107,94,109,110,10,-37,99,-126,-116,-85,100,113,-19,-52,-101,65,-45,93,96,-49,-78,84,-44,28,5,-110,-26,-48,62,127,-53,49,57,67,127,-85,60,120,-96,-67,107,34,91,-60,-6,-80,-77,-8,-119,50,-52,89,-64,96,127,-60,-76,-34,-52,-1,34,-25,99,100,-94,-46,-47,12,47,-47,45,-14,59,3,-85,-74,-49,103,-6,-79,-1,-25,-2,0,-44,-29,6,-11,108,-23,91,-48,56,75,-71,-77,-46,-100,-100,-98,90,-29,-35,-56,-3,54,-62,-126,124,1,-26,-88,4,101,-113,95,-67,75,104,39,-106,68,-127,127,-15,-36,23,-12,-51,-118,-67,-22,-39,-71,52,-77,104,9,10,-106,53,34,-67,-98,-74,84,87,95,38,-35,-38,-103,-125,-124,41,-31,3,-89,-107,-41,-9,-90,-58,-39,83,-106,-24,-86,-93,18,14,23,36,-56,75,-36,-123,10,109,7,13,-119,80,113,-68,45,57,35,32,-17,28,-1,-98,52,-37,6,-97,118,-119,48,-69,-102,-18,37,-4,-59,15,101,91,40,3,-31,5,-9,105,-9,-33,-31,-71,-7,-112,-71,70,-2,98,46,-99,73,42,-77,-38,53,48,-1,76,-120,-33,-62,117,-35,67,-117,58,33,2,-127,-66,-100,-117,-82,115,91,-111,33,-125,24,-89,76,15,84,27,-5,49,-87,-72,-35,-49,-128,114,65,-71,82,127,100,74,41,-63,52,-67,0,8,117,5,-102,123,87,8,-37,36,126,-108,71,-73,20,-76,104,-71,-50,-56,18,8,-62,-105,-52,-127,41,-26,16,-122,31,70,11,-100,-109,-35,117,88,29,-78,-45,115,-86,40,102,18,-58,-84,-54,32,-36,51,56,52,107,38,126,78,-66,20,-77,65,-119,26,-113,85,-92,-35,-67,-24,-47,43,-9,62,-70,-41,-66,-7,-72,-79,-77,56,75,67,49,65,43,-78,102,113,98,-47,53,20,-116,-2,-4,-12,-36,8,50,-118,-79,-37,-120,4,103,51,62,107,-90,49,79,-17,61,36,-15,17,-117,123,39,-87,61,96,11,-108,1,51,53,36,-19,-69,-51,-40,-91,-90,127,-62,126,-72,79,-61,123,-27,41,11,14,-67,76,-17,-70,47,-104,73,32,-109,-120,61,38,-1,31,-37,35,-26,-21,59,-53,18,-85,75,106,-83,93,-31,-18,18,-127,19,66,10,-74,-25,45,-109,18,30,4,-62,13,-47,13,44,-59,-96,19,-113,-18,65,-5,91,-75,-21,68,46,-90,25,-110,-115,1,-88,-91,13,55,86,24,85,-60,108,93,-61,27,-14,28,-17,-110,-18,68,113,70,-52,58,52,-9,111,-64,64,-97,-100,0,32,43,-88,13,0,-32,110,-104,108,92,66,-112,34,65,-64,-125,-9,106,113,-116,-35,91,-88,-91,13,-16,-117,3,121,37,-84,-75,-44,-1,-49,13,81,-77,46,113,15,-115,-37,21,33,-17,-19,-83,27,-95,28,83,22,53,-23,66,-57,-25,-15,-56,106,69,49,63,125,-120,106,-86,40,55,4,-96,43,-26,60,-107,-76,-116,-89,101,98,51,-21,106,53,-49,110,83,-119,27,36,2,86,-5,-50,47,42,-75,52,-59,-71,63,-67,60,6,83,65,124,28,16,14,63,52,-58,23,30,49,-81,-123,-26,-39,42,60,-27,-66,-61,-18,-88,-46,-22,-61,-60,66,65,-100,111,100,116,50,92,-83,103,111,-72,116,-5,111,72,101,39,54,-65,8,-44,-128,-88,18,113,-70,-78,87,-70,29,112,63,-31,9,12,-27,-109,-42,-52,-48,55,-70,95,93,-71,122,-46,-115,53,-22,-27,125,125,50,-58,21,-50,-71,9,-82,-6,45,50,-14,51,-74,-72,95,104,-86,57,65,-39,6,-10,-76,21,-52,127,17,-128,-36,-23,103,87,24,-95,10,95,95,21,-96,61,-24,-8,74,0,126,-14,-44,-102,107,-119,-123,83,51,27,-17,-64,124,24,79,-96,118,43,-95,8,-75,-106,115,-84,69,3,122,-118,-64,96,-106,-29,-78,-97,122,-82,51,14,65,-80,121,-66,74,-119,121,82,77,-120,96,-82,106,56,-45,-28,78,-116,-70,-13,41,90,-77,-55,-49,-78,91,-109,-91,-36,97,-31,27,95,-91,-116,-17,-21,87,112,-51,-82,62,-42,111,64,106,68,53,92,-68,-38,-25,-55,-38,-121,5,74,-96,-77,-109,-14,-87,75,-108,-62,12,-97,-91,93,42,24,-45,-5,79,126,-71,-10,-97,97,-19,6,-80,77,-111,39,-69,42,-61,-123,-30,-78,18,64,77,-99,-40,82,127,-39,66,46,46,-82,-117,-70,77,-17,96,27,10,56,83,16,22,114,24,114,-89,118,116,-84,19,-88,16,80,-25,66,-70,111,70,-86,10,-88,-1,80,-95,-82,95,-20,-114,-121,26,-15,-77,-104,-120,-7,123,97,68,69,59,-12,24,-20,46,100,75,-76,-41,-23,79,82,-115,-3,44,-69,-100,-55,95,81,-125,-108,-121,-46,-112,-48,-22,-10,-60,-40,112,22,89,79,-99,53,48,-54,-110,16,77,-51,94,59,-50,-103,-10,34,60,-115,84,31,-55,-58,-10,64,-5,23,112,96,75,85,4,-106,55,-77,-33,87,-79,-76,53,71,-92,-8,63,118,-84,-60,99,107,88,46,-89,24,98,-41,-36,-22,-88,34,-23,78,56,84,52,-14,123,60,-20,38,-66,-56,67,-80,-6,117,115,121,-126,39,-77,-8,22,89,29,-101,29,55,-31,-108,125,123,-46,6,-88,103,-35,25,65,-58,-118,40,26,-39,62,15,77,-25,-50,117,79,44,-79,64,94,-114,-31,-26,-10,-67,-114,-19,24,69,111,14,-52,-33,110,50,-107,95,63,-71,-21,36,-22,-7,19,-95,-71,-38,124,-88,47,120,22,98,-69,73,-114,-5,-18,106,-102,-41,-26,28,-101,-41,-105,-31,-26,-120,22,-21,-44,-31,-50,-127,85,88,111,33,-114,-53,-12,71,126,53,-55,82,-104,93,-77,41,46,-50,90,54,-38,-28,-128,-68,-13,-80,34,-63,60,31,-81,40,77,55,-5,-17,-110,94,30,96,61,26,43,-48,101,-128,13,-8,-29,-6,-60,115,107,-62,-57,54,13,96,114,-89,-69,36,-40,106,107,98,19,-28,14,-4,-97,-60,-64,-71,-107,-48,-50,75,-54,90,108,60,-101,-104,92,25,-60,-17,-63,48,103,113,59,24,51,32,-101,-26,121,71,-83,-21,-68,79,42,-115,5,89,65,-38,28,-91,4,22,89,7,122,-57,-51,-120,-110,-58,-42,-70,102,105,-112,33,21,-83,-14,62,123,-116,-55,-114,-110,95,-46,76,-6,-12,-88,-48,49,-126,-67,95,42,-94,76,84,-64,-112,-20,114,-8,9,-96,-38,-85,-38,72,55,127,7,117,54,41,-52,-89,-46,-121,-95,-97,-113,95,46,79,-105,36,96,62,111,89,-38,-97,61,120,24,90,-111,43,-69,48,88,-58,25,-89,55,14,26,121,-126,79,42,56,-43,109,-88,-53,31,-114,69,-1,-81,-50,94,35,20,62,-93,69,-96,-35,120,-103,-86,-44,126,-96,102,12,54,-97,-79,-49,97,-18,80,-111,-68,-17,39,102,87,6,-10,2,11,-89,-74,-43,-104,-9,53,28,-68,-126,-71,-26,66,34,102,-36,32,-96,-83,-127,87,83,-50,-98,-60,71,-81,-97,108,-74,50,-98,20,-9,75,-48,8,0,124,74,-27,-59,1,118,-121,52,-57,112,15,81,120,-66,-10,42,87,-89,-92,-123,-1,-74,-29,126,57,31,-50,115,-47,-89,-20,-107,51,28,49,110,38,-37,-73,-72,-70,-20,-124,-109,67,-114,7,64,32,101,-76,-107,52,-109,-89,51,-51,-98,-3,122,100,-2,-57,34,-38,-101,22,15,92,-104,9,47,-9,47,-18,27,-38,-122,-58,-20,102,-63,-78,-19,-71,65,-112,-48,49,85,27,-113,-57,24,108,81,-96,99,-47,-67,-121,2,-17,-29,-9,109,89,-45,-127,122,-59,44,-81,55,-39,5,40,-11,0,61,37,18,-82,-97,-69,27,-45,11,-70,31,-88,117,-98,114,115,75,-104,-3,46,104,-67,21,49,18,95,-8,31,11,55,22,-76,39,-17,24,10,-63,-97,114,57,-46,-62,34,-66,-86,-94,-109,-67,124,68,42,26,-65,-60,-41,97,59,118,55,-104,16,-25,-99,-13,-28,-50,103,-50,51,-77,55,91,53,-17,-82,-108,-121,-54,24,118,77,24,73,-120,-61,36,-63,-122,51,-88,104,22,76,14,118,63,122,-31,-115,59,-92,29,101,-66,-48,-7,30,-5,86,-41,11,-87,71,-15,-30,75,-110,2,91,9,18,101,-51,-102,-115,-83,37,14,-41,-17,-43,106,-108,-42,-86,34,65,57,-13,12,114,25,-69,-36,-48,93,-89,-99,-104,54,15,19,-101,-105,-51,24,-26,93,-2,95,-43,51,-112,-14,-83,69,122,77,20,-7,-29,107,79,115,-102,115,-58,-111,8,46,112,-67,-97,-20,-88,98,-30,75,-47,90,25,110,3,-8,94,70,47,22,-103,-91,-54,58,-12,-38,-50,51,72,37,27,7,-50,-112,31,-14,-76,70,-95,-109,48,-111,-75,118,30,-2,-7,-123,33,32,-89,-47,-6,25,67,73,-7,-29,-93,49,112,111,76,-65,-76,8,-95,45,-79,83,84,23,-96,20,-52,15,-56,-70,7,-58,85,106,122,-96,-84,8,85,-101,35,-30,-14,23,33,112,-86,20,73,-93,-30,-8,-39,-79,-77,-36,-107,-38,-112,-89,-27,49,103,48,127,31,-22,68,100,-35,99,57,74,-26,85,118,-43,101,105,-76,-127,-93,44,-1,68,39,12,93,13,-33,-78,11,85,-51,44,-99,-85,12,-63,98,-92,-5,76,25,-86,-68,-121,-67,-109,-64,31,64,-58,-90,126,52,20,-41,27,120,-117,-86,71,-128,-28,-128,-39,82,113,-102,59,30,78,-128,30,103,-95,-11,117,74,94,113,46,56,41,-96,48,-85,-28,-25,-79,104,-73,3,2,30,76,-22,-103,101,-89,83,34,2,-26,127,25,-82,18,8,-3,-20,52,13,-21,36,90,-38,112,-85,-79,-92,9,-72,15,98,-26,-32,26,-4,-26,-94,-5,112,69,-21,-84,31,-17,-112,46,-83,-24,-105,-102,3,15,-60,99,-123,-6,-47,-120,22,70,125,35,86,38,35,-100,5,89,96,-33,64,-55,29,55,-82,-3,17,52,89,104,126,-125,62,-80,113,53,34,77,83,-65,-28,-27,2,-114,68,-37,-4,89,-94,-41,51,43,-85,-36,93,74,-93,-8,109,-70,-92,114,-120,-63,44,77,102,36,50,88,16,99,19,-9,64,-43,-57,-81,-67,-9,-70,89,-64,53,114,-99,5,87,-31,74,66,75,-37,108,-100,-101,85,-44,-120,-70,-32,92,80,-16,30,112,-102,99,96,-6,123,100,-89,102,-38,102,-90,-80,-9,9,52,-47,-114,-128,-81,-112,2,-40,87,-41,46,119,-15,-107,79,15,105,-53,108,-22,72,36,45,-88,82,59,19,27,118,123,-93,-44,-46,93,-98,105,64,-80,99,-8,-110,-51,33,76,-58,-103,87,26,-13,76,-93,83,-13,127,-4,-54,-52,21,70,20,-93,-7,19,102,7,94,41,14,67,-52,17,23,54,-81,93,76,-61,-23,-92,9,-118,110,99,-128,-53,123,-127,-125,-24,-76,88,63,-79,-65,71,59,-79,-45,-64,-111,-85,-53,55,22,-102,-78,48,25,-67,100,0,72,30,19,56,-6,-54,40,-71,98,-42,127,-46,40,58,34,-6,21,-112,-113,2,-42,-14,-25,-78,12,-55,62,58,-44,-127,-40,85,-80,29,-27,-72,8,73,-36,-32,-21,34,-46,84,75,41,109,-41,-92,123,20,-123,72,106,47,41,-12,-73,-38,117,44,-89,-128,-102,49,-65,-43,69,-119,-53,60,-97,9,-39,-118,-33,28,-58,105,-41,111,70,39,-41,58,90,20,-25,110,-21,50,-114,-104,-68,-35,96,-16,58,98,26,-98,-80,63,74,-85,119,21,-124,118,8,-61,-125,23,-112,30,-77,-11,92,-28,-101,-9,-57,93,-49,32,103,-97,87,-96,116,77,-48,92,-27,57,-29,52,-25,-107,-77,114,-50,99,-79,-58,24,-19,-96,47,-113,-80,8,-72,-83,69,-6,92,55,39,17,21,76,-127,-5,-115,-60,-55,-28,-43,40,-43,106,-35,112,-57,25,19,80,-39,-6,-79,-111,4,-59,121,-77,-103,-89,-113,-127,28,61,-125,-50,58,-38,43,-33,124,41,-105,69,2,99,-31,83,-119,-21,90,38,92,-88,-83,113,56,-56,-49,61,-74,-2,101,-23,-114,26,-95,114,-52,-73,-53,-7,116,32,119,49,81,-88,-102,-49,-126,50,38,-47,-13,76,-73,69,-124,5,-63,-53,11,-42,-97,35,46,29,112,-43,-2,46,83,58,-17,41,125,-5,-34,-96,49,67,-17,-80,-82,38,81,29,-13,84,96,-112,13,49,65,117,23,52,3,49,-43,-26,-88,-97,-60,93,-93,-34,-74,-54,5,-113,-73,64,23,-95,17,50,-112,123,4,-90,-35,103,-41,16,26,-104,-119,109,-71,95,60,28,-71,-41,5,-26,-118,-31,58,-126,-93,-50,30,-48,-51,-31,-92,-2,-75,85,71,-52,112,-48,-65,74,-24,41,121,104,-95,122,-49,-83,119,-20,97,38,23,-73,55,-22,-118,45,-37,25,47,-122,-4,89,125,-105,55,37,102,52,34,-12,7,85,-6,15,17,13,97,18,20,-92,107,79,-16,117,60,-80,-3,-23,-70,81,124,52,105,-36,-44,-125,-81,-40,28,88,-111,-57,-96,-49,-5,18,71,-37,-73,32,53,1,77,-124,-70,-107,-79,33,-83,-34,43,-125,20,-55,-53,15,59,59,71,-97,44,78,33,80,-20,65,-72,68,-125,23,-3,-30,-89,93,88,64,123,-44,117,126,59,38,32,-5,40,125,98,124,-104,-31,-27,-59,98,12,-43,125,-48,-74,62,43,-6,73,19,-3,100,-104,35,-62,47,-8,60,37,-125,-100,49,95,-74,-15,76,8,58,14,20,-85,-56,29,-125,70,94,-60,-112,-56,82,73,78,92,-40,-37,-50,37,22,19,23,63,-49,116,113,27,82,-5,46,24,85,41,-11,106,102,-123,45,60,-108,63,-67,124,114,53,-126,-14,-108,64,-6,-27,-19,-101,102,-27,112,-45,-4,93,-36,-68,93,-111,-64,69,-109,-128,-78,-16,-79,-62,-51,-8,-40,-39,-94,-4,-117,123,70,87,-79,-91,15,18,11,98,-51,-104,-59,-76,40,-82,100,110,102,13,42,71,117,-81,-120,-41,-48,-17,44,-20,-44,-120,79,76,123,-128,-51,111,71,-41,-86,-76,-32,80,124,-43,-65,123,5,21,5,55,73,34,-46,-55,-108,58,116,110,59,85,-61,-24,111,-86,-34,-128,59,-111,45,-125,-47,-94,-90,48,-56,-109,-95,-37,79,-127,-17,102,-96,-52,16,-77,40,31,-59,-93,10,-26,-28,108,-85,-2,95,-25,-94,-88,120,30,-69,-24,-9,90,67,81,-92,123,42,116,12,123,86,88,-86,10,-77,-16,54,-119,-43,-54,-7,104,-75,-111,-3,63,-95,-96,112,-68,68,80,-128,3,-37,-13,74,-113,-88,62,-32,-40,55,-48,-21,-64,118,64,-126,-41,-75,-79,-112,-78,19,-81,20,-10,97,86,-20,127,56,101,118,69,73,-62,52,125,-84,-15,-30,65,-53,105,-59,-54,-87,87,87,-116,-120,49,71,-48,99,-108,-19,-107,-40,-98,58,86,-125,-119,-62,-38,91,23,85,-55,-31,52,123,-76,77,120,49,122,-19,-118,-56,86,-15,-74,-82,47,-83,-121,21,-69,-86,119,-39,59,87,-84,1,19,-67,-58,-122,-45,-38,54,-96,-13,-91,100,-118,-97,73,-72,-30,23,-30,-121,-36,94,20,-38,22,-4,-7,-85,50,114,95,-105,35,-85,-89,-41,93,8,45,-53,87,93,30,117,17,-61,-61,69,48,-52,-99,-75,-104,-113,10,-27,80,89,107,119,-76,-30,125,75,122,55,8,-13,-37,-37,24,13,33,31,-14,98,101,-51,27,24,37,-51,-15,110,83,-49,85,-122,-30,18,92,-17,101,12,-54,97,-99,4,-82,73,-46,111,-7,29,-75,90,-91,106,45,68,68,-111,-63,99,-74,86,-122,-35,-28,21,-22,74,-70,-80,-93,50,14,-9,-84,45,-41,-18,-50,-105,82,-94,-89,102,-38,74,120,90,-17,43,-82,-83,-17,-119,-106,52,-63,-80,123,124,-118,75,98,0,-76,-100,77,-72,80,-18,-49,61,107,100,89,-27,-70,93,-52,-68,-46,-89,49,-9,13,-77,-29,103,-69,-52,-88,-65,39,-33,-119,-105,96,29,48,86,55,-76,62,-128,5,109,73,-94,-43,-11,-82,-32,122,52,33,29,-40,63,-89,-88,-16,77,67,-69,-59,-106,112,59,-67,6,-92,-115,-120,107,40,38,-33,69,87,81,8,9,9,-31,-68,-110,113,-117,-81,44,-62,-85,-23,77,-6,84,-126,-63,58,105,75,-48,38,80,-45,-2,34,-62,-8,107,-16,-82,-128,-17,57,-113,-99,12,-110,-47,-44,100,-23,121,-29,42,34,-64,-124,100,123,105,-128,-7,117,5,-13,13,-125,112,-4,86,53,-128,-87,-81,-75,-18,-77,116,-110,-122,-60,100,-124,117,-35,82,77,87,125,29,-127,123,100,-54,-117,-100,-105,-49,-77,2,-4,-110,-101,6,63,53,-103,76,-40,-118,108,-103,122,52,-3,54,-86,57,65,86,-106,4,-99,82,-44,68,15,-41,51,17,4,92,-63,22,-83,-126,65,63,-115,76,80,-109,-50,16,105,79,-115,96,34,-71,-61,-89,98,92,-36,-88,113,56,18,-123,32,120,110,81,-29,108,-31,34,-24,-102,-33,-8,25,76,-128,77,84,90,76,-98,-4,-104,-105,-65,10,-62,29,-80,89,-116,120,101,22,-36,-85,77,3,-44,-107,63,45,-19,-126,16,-29,1,31,-125,-108,113,30,-103,-38,-127,26,-18,-56,-120,-121,32,102,-25,-7,-85,47,-50,-121,-109,-6,-127,-34,55,-114,-34,82,-6,-44,83,-2,-69,-34,101,-21,123,25,33,-23,-108,-107,-46,-46,56,-30,38,108,106,60,-31,-78,8,25,4,124,12,29,37,2,89,100,40,-48,21,-87,-53,109,-116,-46,77,-60,-64,-68,122,-25,-109,-71,28,62,121,-84,-73,80,12,-118,-88,-89,109,106,-74,-62,89,58,-65,-73,-74,-64,-110,-73,-27,96,-87,-128,-122,-72,54,42,22,73,-37,-87,6,29,31,-46,62,-99,23,63,114,10,-20,-43,68,-24,15,124,-63,76,-25,-12,30,-86,-43,38,111,-121,69,-5,-49,34,-42,-51,119,39,80,86,-32,27,-74,-71,-24,73,-25,74,-11,53,104,117,87,-32,-11,-115,-24,99,-78,-7,-113,-99,-76,112,-20,121,50,-9,-103,-10,111,-68,-9,-35,96,-108,10,-38,2,-18,-73,-64,90,-105,94,103,-22,22,116,99,-68,-42,124,-122,-117,-119,-43,-6,47,72,90,-52,52,-76,2,-22,-84,-19,-85,-124,92,13,-115,36,2,107,15,127,-76,47,-39,-109,3,90,-24,1,-74,-29,-17,-27,-21,32,102,26,-57,-108,-114,-112,-104,76,-47,-17,86,-86,38,106,114,-81,-77,52,67,-28,-68,-63,23,-57,-110,-81,95,-35,-97,-29,-96,-11,64,-1,-118,-99,-25,-24,68,-118,-84,68,-113,94,-39,77,93,-80,-1,12,-123,97,80,111,-117,-52,5,-24,5,-98,-27,48,-96,-37,-108,70,-28,63,-21,123,23,67,-33,-96,47,-58,-50,-124,-109,-64,20,-37,44,-101,34,95,100,94,-57,39,-4,-21,-62,-76,-37,-72,-51,10,114,-21,113,45,-68,27,-77,47,105,18,122,-117,43,-99,-82,40,-15,-7,112,27,-86,-37,83,-8,-53,1,-110,47,64,-58,44,-50,14,18,-33,69,-17,-90,51,35,-58,-103,29,100,38,107,-44,-99,106,-49,-90,23,107,-44,-79,7,-21,-10,40,-76,-58,-50,-106,84,-47,34,91,-9,23,113,114,-11,-91,-62,64,20,58,44,-76,-105,-55,38,-101,121,94,-125,81,-55,-128,-101,-22,100,78,43,94,-46,118,-103,-36,81,48,45,90,-3,2,44,-8,-66,-49,104,116,-90,-69,-78,28,-65,15,-31,103,-71,14,-103,-90,-54,36,-81,-62,70,-35,-60,103,-13,45,20,-32,-93,127,59,127,-54,-89,-23,117,48,77,3,-84,-35,-56,37,87,60,-115,11,-27,44,103,78,-16,-112,-3,-44,45,61,-112,-102,-104,88,-67,102,121,-106,104,46,-39,52,-91,-77,-13,-79,118,-52,61,-90,-5,46,24,-59,-84,57,-34,101,-62,47,-66,-18,122,28,102,32,-123,-19,121,81,12,-110,89,-78,-38,8,-78,-94,-2,44,111,-36,-2,-66,22,83,-59,-43,92,60,-29,-71,92,-51,7,19,-2,39,-66,-100,116,-78,92,7,124,103,107,127,-115,80,62,99,98,-95,-74,109,-3,59,-126,-61,-93,11,-58,87,-24,100,113,21,-65,-71,-103,-106,122,96,-71,100,-38,-118,-23,72,0,-55,-68,-108,88,73,82,119,-105,-90,59,-41,99,37,76,-41,-62,94,18,-37,67,68,56,-41,110,53,-24,14,-62,38,-121,-84,13,48,48,116,-17,110,-80,-63,50,-4,8,111,-77,77,-4,112,19,-9,64,-32,-45,72,77,-90,-127,88,74,-61,-85,63,-75,125,-46,-15,-86,79,116,76,7,46,-99,36,14,-55,0,95,76,101,-115,67,-18,-35,71,95,-104,8,-124,38,-42,13,-70,18,98,77,51,-82,-27,-61,-66,2,26,2,-26,-61,-119,-70,44,114,27,99,-99,14,97,34,63,-88,-44,65,82,30,-47,-99,-97,13,-13,48,47,4,117,-29,37,11,-7,28,78,41,-59,-94,8,99,-125,32,-109,14,-13,-58,11,101,100,-94,-61,45,-49,90,47,84,77,19,12,-24,-86,-63,112,-48,73,4,-91,54,47,3,67,5,68,-26,-64,110,-71,113,-96,105,23,-14,-79,-18,67,36,-35,-36,48,68,-33,-5,56,39,-56,-20,-11,-43,6,82,-33,121,29,8,-78,28,-29,-101,-76,-81,116,-98,-72,97,-16,107,123,-89,-47,-84,102,-113,-107,105,-24,-112,-67,-77,-41,-18,29,49,-19,54,49,41,20,63,84,15,103,33,50,-25,-118,42,87,61,48,-48,-121,16,-74,-85,-13,6,-14,-76,82,90,-68,-4,-40,2,17,-101,81,-80,102,-2,-64,-54,-74,8,7,-117,99,21,21,-50,74,-36,-89,-75,85,-35,-29,-105,2,-55,2,28,71,-118,53,126,-84,2,9,-20,-104,45,4,76,-113,10,124,83,81,88,50,95,66,44,-110,122,17,30,92,-85,26,-53,73,-78,-32,-127,5,3,34,-75,81,54,-15,-13,9,-42,-126,-102,7,96,119,34,109,6,67,-70,116,9,-26,103,19,-9,116,88,-12,-88,39,92,85,91,-87,33,-43,120,96,-59,-53,84,12,-18,-68,-87,3,48,-99,-28,87,21,-88,86,-93,116,63,33,100,-65,-56,-36,-36,-38,-80,-97,-62,-87,66,-65,77,103,85,73,-99,103,102,104,-80,-70,60,-96,-6,-67,1,-1,-44,90,-80,93,-59,39,-81,66,63,-35,17,-58,-56,-49,83,71,-80,-54,-111,92,-7,-48,29,-7,56,-107,-114,-75,21,54,-124,-3,-60,-78,-13,61,-110,123,80,-49,96,-105,-115,-29,112,-68,126,-87,-74,82,70,16,-70,-84,53,22,-16,29,-40,-90,-47,14,-117,-3,6,-13,64,-84,87,-100,52,23,-57,108,74,-37,59,82,45,87,20,-65,52,57,-96,-61,2,-39,-33,78,-79,84,-61,63,34,37,27,-13,12,101,32,9,-16,-19,21,59,-119,-97,57,-124,127,6,76,83,80,-31,27,102,-105,118,56,85,89,98,16,-57,68,3,6,58,-95,-77,-78,26,-26,5,-21,-113,23,-110,90,-16,35,-23,-108,-47,-14,102,-42,119,46,58,10,83,-117,80,-49,-38,-58,25,80,-85,40,-54,-2,-35,-100,-80,-77,87,-122,-45,-94,-115,63,86,-10,84,-47,-114,101,123,111,-75,71,-111,-47,-35,43,-99,-22,106,-3,-89,-94,111,22,-52,95,-17,104,71,96,10,7,-99,-90,32,-38,-81,-7,-112,30,-16,-11,106,-104,-30,78,99,-110,30,-31,-125,111,-50,-19,-50,-66,109,-113,95,26,-74,-86,-66,4,70,-4,-14,-2,-86,-83,48,118,-62,-30,-78,-2,102,-105,-45,83,37,58,53,100,-66,46,-25,-104,125,-112,89,49,95,75,22,88,19,-76,-35,101,39,20,54,-82,61,-40,-83,-106,32,-106,116,-80,-52,-45,-86,-126,-56,-71,108,52,70,39,103,-24,71,121,120,117,9,5,110,-97,-79,-39,-56,77,71,-90,-97,3,-8,-64,-102,-5,105,59,-100,-76,-65,-99,-6,-7,85,115,112,14,118,65,10,-60,116,68,69,-83,-118,23,24,13,40,68,-78,-2,-43,79,96,-63,-5,-19,-56,19,94,-79,-7,96,19,-93,-47,31,30,22,43,89,-104,61,-49,29,-111,61,121,-41,32,116,-17,121,-109,-51,7,51,-6,-80,-105,-84,-41,88,16,-61,91,115,-25,69,-80,-12,-70,45,80,75,-38,-22,111,15,39,-71,62,68,40,-51,11,-9,44,51,29,-27,112,-106,-95,29,-114,-105,68,105,-68,-109,-13,-82,51,33,50,-48,-103,-65,-46,13,-51,-29,17,54,-91,123,108,-73,-120,43,27,100,32,-13,52,123,-52,33,-43,-110,-76,-79,-30,-86,109,-90,49,103,39,-28,-52,41,0,106,-13,10,-57,124,-15,10,74,-124,26,91,-63,114,-48,52,83,11,-44,95,-23,13,-57,114,-108,82,96,39,27,-34,29,-60,99,30,5,-101,117,-128,-74,-47,-33,-118,-69,-121,-112,-18,20,-6,-35,117,-80,-35,109,-102,24,-33,47,-5,-13,101,4,-127,25,1,-117,-57,-65,74,-64,-107,125,0,-78,-60,110,-100,-1,-19,-63,27,61,-17,-75,-84,-29,-56,-25,21,107,46,88,-33,-89,109,83,-83,-100,-121,-55,-48,-3,29,28,98,-64,-59,-73,-65,-63,-86,30,92,-29,4,65,-26,47,-111,1,-21,26,-109,-86,-119,-1,113,-29,-88,77,75,-54,-35,22,-95,24,-40,127,80,-56,-24,43,125,-18,97,-77,-32,61,-85,69,-105,19,9,65,127,10,9,90,-76,-37,-2,-18,-15,-57,2,27,11,-51,109,28,17,2,90,69,22,98,-55,-63,-53,125,48,-13,44,-96,-94,-116,65,88,-2,72,76,61,79,12,64,-112,-11,44,72,-103,-29,106,-24,78,91,72,-93,74,-123,-36,-121,4,79,92,-28,83,-109,-98,-99,63,92,98,-39,94,-43,-57,10,83,-23,92,50,79,-111,-32,-79,40,-34,-26,91,115,-124,-19,68,-72,56,60,-101,-73,-55,36,-83,-59,-86,-73,3,-98,-85,3,103,10,-113,34,53,-90,112,-114,-122,26,46,58,52,51,-101,-1,29,-87,-108,-77,25,-51,0,32,97,-36,57,67,117,-124,-61,13,-67,8,-108,-50,-59,28,95,-112,10,124,105,-54,-127,-43,-86,-50,53,-1,-108,-111,65,35,-42,-28,-119,-47,-92,-97,15,-50,12,63,-42,10,-71,22,-23,83,-24,-28,20,69,114,98,108,29,3,-42,123,-101,120,13,-36,-44,87,15,74,-89,77,56,-23,65,-12,19,54,66,-31,-16,-111,109,-43,111,-87,69,79,-8,124,-17,-46,-48,15,61,-28,108,-72,-58,-55,53,83,-80,118,43,-88,-54,74,-102,-38,56,116,-80,-125,-75,-3,105,43,88,-66,117,-120,-58,82,74,-5,6,78,-72,-79,-51,85,-49,-100,123,-42,4,90,-33,-55,88,127,60,-115,20,-123,123,117,9,-75,122,-19,-97,-98,-15,90,-32,92,94,-86,41,68,93,106,-60,-41,-80,40,24,-91,-86,-39,73,-120,-27,125,-87,65,-123,-41,-9,35,113,91,-40,-111,2,5,34,83,-66,114,-111,90,57,126,-93,62,-117,5,60,-68,11,-105,-35,-33,51,-52,-45,97,83,117,36,-81,45,59,-43,64,-62,69,-95,110,88,102,-125,107,-97,43,95,-122,4,1,-51,25,-12,43,-22,100,98,-64,94,64,-74,45,-38,-46,102,-21,-37,29,-123,-104,119,-2,-40,115,-31,15,2,21,-115,75,82,-8,18,74,8,27,-80,90,88,10,37,-104,-1,-82,77,80,-97,-99,-105,35,40,110,-49,24,99,-94,43,20,40,-40,10,113,-71,43,-63,-22,77,64,-3,-79,-82,-44,-53,23,86,110,-124,97,-27,-106,-95,104,-96,-121,25,-14,74,54,120,72,107,-128,-9,-60,21,49,-67,-12,18,-30,-33,-91,77,40,38,33,-70,7,-43,-89,44,-12,111,-108,14,36,-15,85,112,-85,-109,-48,98,57,100,-17,85,-123,-72,-111,60,15,-124,11,90,-105,7,-107,-121,91,-10,-98,83,-116,-10,54,-128,64,59,38,64,-25,36,-17,101,-96,-108,67,-89,46,20,26,126,-71,-1,0,77,32,-72,-31,-29,44,-14,-8,-74,42,-11,-21,95,119,84,123,-128,30,27,20,-74,38,-11,-122,41,94,-51,-33,-115,45,74,7,80,35,18,-30,-101,-6,95,-92,-69,33,16,15,-59,-111,3,-67,-86,28,-43,40,68,27,-111,-95,-26,98,38,83,106,-126,-34,86,-54,-102,-110,-88,38,40,-37,46,81,11,-122,-8,-46,30,112,90,-40,95,-61,-73,77,-123,-44,105,32,-109,-110,81,-23,127,-83,81,-55,77,62,-44,-33,-70,-62,4,52,115,32,-36,-96,-123,-33,86,127,86,38,43,53,21,106,-125,-69,-16,84,-98,-80,-12,17,-25,-70,-72,34,-33,-115,-119,48,42,-34,6,91,-18,-19,22,0,46,-92,-27,106,-116,35,78,44,50,-110,-113,7,14,18,-123,22,-112,113,-91,-51,-17,88,-83,-51,-19,30,28,109,-64,-114,86,73,-33,30,-1,-121,-58,51,-109,86,104,89,119,-76,-28,-90,-95,-100,69,-55,-23,-14,58,-112,30,-77,125,72,-99,55,39,67,54,-6,4,52,50,92,-47,-26,6,76,3,96,89,97,126,80,-80,-100,-76,67,-119,-36,58,-13,16,53,53,5,123,106,31,33,-67,111,-27,48,7,-111,23,-110,-42,-16,-105,38,43,51,-17,-12,-98,89,-32,3,64,118,65,21,-66,-1,-93,-115,93,-75,7,-25,126,59,107,-19,-26,14,-107,75,45,-16,-110,-34,50,2,-11,-109,19,-61,125,-94,-63,123,-24,-11,54,-115,121,-16,-39,98,2,77,102,90,52,-110,-55,109,-119,-47,-121,116,119,65,68,6,6,22,103,-121,49,-117,119,-38,-90,124,-32,104,90,109,-16,-100,-92,61,-115,-107,60,-26,93,27,111,-124,54,-72,-77,123,-79,89,-89,-54,-94,108,59,-49,78,-108,-4,-28,-119,55,42,36,95,123,-7,-99,-42,-100,-6,91,-65,-24,32,-77,106,59,-5,-93,-100,115,35,70,-90,-7,-6,40,-20,105,76,-32,-74,77,-32,-91,114,49,-126,-83,-81,84,113,80,-69,-99,-13,-29,-103,102,-69,-108,-127,87,-43,-11,-126,-113,119,-104,-11,79,62,26,-90,-22,7,-64,-107,77,77,-83,24,-90,52,-57,10,-22,114,-38,115,-37,-52,-63,-76,-13,94,-56,-96,78,59,33,85,-82,-97,10,74,-95,-113,-78,99,-66,50,4,32,102,69,20,-76,-69,-57,-26,5,-105,127,94,-72,-19,-117,-7,-38,24,-91,59,86,91,9,-58,126,-81,-126,-39,28,35,124,101,74,120,-90,54,14,-31,-108,80,94,-40,50,-56,26,-5,19,-37,-39,-45,-117,9,37,53,83,-73,-22,-107,-102,-104,38,-126,-125,90,-106,74,-98,72,21,-76,-56,20,109,29,52,-45,-42,-51,51,-1,122,91,12,-18,-69,55,-3,51,-111,-106,123,11,-108,-93,51,96,-100,91,-87,-51,70,-39,15,-81,35,62,-54,-87,33,-64,-125,-111,14,-109,-89,70,-36,65,-122,-47,126,126,-119,-49,-34,46,126,-87,88,-117,-107,119,29,-65,25,-89,62,-89,-88,-117,103,100,9,-36,56,79,95,-124,66,-5,-126,-9,9,-95,-95,-93,54,-2,-54,81,-106,21,-25,108,105,-37,-9,-97,69,122,84,39,-124,98,59,-25,-67,18,35,48,-105,117,78,-75,-42,3,-76,-107,76,79,3,-81,-61,30,-99,-99,101,-118,-94,112,-88,-19,-82,103,-67,76,-71,-105,-24,-91,-20,83,90,120,-7,34,-26,-110,75,41,62,-116,-77,23,109,107,74,-78,94,-125,26,-13,27,99,49,77,-73,100,87,77,0,88,93,-23,-115,-36,-108,-24,123,-65,-60,-63,-44,0,19,102,-19,89,69,85,-96,88,-103,123,108,119,-68,-99,89,11,-56,116,-106,97,-68,6,-60,47,52,-1,-53,94,-55,-107,-3,-9,-105,-3,-21,-69,-37,18,-59,78,37,127,118,107,-117,-79,-43,-108,124,33,-121,-25,52,-71,76,64,-2,27,-52,68,88,14,25,-115,57,30,-36,-16,63,-75,92,110,-57,-105,-82,-21,-72,30,113,-92,-20,-15,-77,-20,-25,106,22,56,79,21,68,98,115,71,32,20,122,-70,112,38,62,105,48,15,115,47,-124,48,-71,-41,-85,127,-6,9,122,110,-68,-45,-35,-21,-103,122,30,-70,42,68,9,83,13,105,110,8,98,-42,93,117,-26,21,-42,-82,27,110,-123,10,-98,-5,22,29,-112,-32,109,31,7,-91,22,71,-56,60,29,-126,4,63,-64,-77,74,-53,92,-7,-54,-128,72,-20,-92,6,-89,-20,52,46,32,-94,-119,-90,-92,106,74,22,-50,88,-69,107,8,3,55,-102,-64,28,-106,74,13,96,97,110,-59,58,83,-95,-49,-106,87,71,9,-19,125,26,-26,-93,-28,-52,20,-63,49,-73,-11,112,14,121,-65,88,-128,4,72,-117,-29,-74,-33,21,102,125,112,-49,-82,-7,-28,82,46,-71,12,118,4,121,97,16,28,85,50,78,-24,76,74,107,-47,-67,63,-94,-112,93,-59,-48,-32,119,84,108,74,52,-113,-17,-96,27,122,-67,23,-10,33,-63,-54,49,57,-103,-58,54,20,102,-18,-78,-125,62,20,109,7,-20,107,31,-85,5,104,81,-61,98,51,125,-32,-90,125,-100,6,64,104,56,126,24,-86,109,23,-100,15,23,50,22,-83,30,-128,-82,123,-89,14,-48,-82,-36,-92,-65,-12,10,107,-61,-124,-36,-75,49,0,-105,26,119,101,120,-37,-38,-89,18,-55,-47,-118,-92,-17,48,-14,-50,-72,112,-100,-125,-106,-114,126,-23,-105,-41,102,-7,-5,87,-25,71,-111,-11,-76,-106,57,-84,39,-28,123,50,47,-23,-66,-101,102,-65,103,32,10,84,82,34,32,-112,-14,-125,-109,79,28,-18,97,38,56,-36,-70,-6,-78,-80,33,-120,104,68,27,41,93,-95,125,90,-18,-97,-33,-102,53,-79,4,-27,30,-51,41,-72,-74,92,-102,28,-56,114,122,-105,121,8,-51,63,-117,126,-56,-127,-126,49,84,30,-76,-13,-45,53,57,3,34,-85,49,-112,41,-71,127,-111,22,-114,-34,38,-45,44,97,52,4,-111,-35,-98,-24,-53,42,74,-118,-86,-19,-119,-52,-88,22,-89,119,71,112,-21,26,52,35,126,65,117,-110,4,47,-66,21,-51,-8,-72,-120,-107,72,85,3,73,72,-27,-36,-114,19,71,-89,-100,-111,116,-97,87,-53,-68,-121,17,-29,-60,-28,116,-64,11,45,-83,-125,-55,71,-3,4,-123,53,42,-122,-45,104,-22,101,81,-24,-37,49,91,-2,-77,44,-72,-64,-100,-80,-75,-26,108,-102,19,-107,-51,-23,-11,-4,118,-18,-18,125,90,-84,41,8,-54,30,21,-91,102,-115,-99,-35,-35,6,24,102,-108,26,-8,39,1,-93,76,124,28,-9,114,-39,9,44,72,-72,-24,67,-41,-3,-58,-92,-31,-57,127,29,36,16,-1,-87,-124,-34,-23,57,118,-38,-19,51,121,15,-44,-2,8,-87,-47,-82,71,-14,-41,16,48,79,118,17,-83,-84,-62,5,-127,-20,-12,28,54,-95,-89,115,124,-18,40,-118,-125,-97,3,15,89,-21,45,-19,23,-58,-1,39,19,-18,-121,127,-46,2,38,-24,-64,-48,81,19,-16,80,-128,-37,123,-43,-73,36,-127,55,121,-62,14,93,56,42,-117,-43,-99,24,-79,-46,-112,-34,-99,38,-19,11,23,-70,-128,-121,-81,-110,88,-76,-53,-51,51,-128,52,54,-80,-58,-35,83,10,20,27,-109,119,112,38,-19,97,120,67,24,51,-65,84,37,112,-8,67,6,-104,-127,-50,118,-1,58,-97,-94,-103,78,10,30,-94,-95,-42,107,-41,-67,-39,63,27,-108,91,21,-88,-23,-118,-55,-28,-1,-9,16,-37,-29,-55,-80,-82,78,-112,62,46,48,-41,1,50,34,12,-53,123,46,1,37,108,71,3,41,-94,-123,-50,-16,-42,8,86,-39,-24,51,119,20,22,-55,115,-82,-86,114,-110,8,-72,-15,74,83,93,14,59,122,3,107,-17,93,51,41,-56,-125,28,-21,38,-59,71,69,-48,111,79,38,-29,-23,0,-17,-110,75,113,87,32,50,4,-113,-4,12,-27,-20,-61,-41,-56,-117,-99,-77,-87,115,-99,40,-99,-95,-31,26,119,-102,-53,2,29,4,-21,-86,112,94,-82,45,-65,23,-23,-85,-17,-97,100,75,116,-110,1,-109,-111,29,80,-90,93,74,3,95,112,-48,-106,-18,25,77,-29,-22,72,-117,94,9,95,113,-1,-104,-124,-28,12,97,-109,66,33,-94,-29,91,-88,-102,77,-76,21,-65,95,51,54,-16,-116,78,78,-79,-107,-51,-123,2,40,49,-124,-90,64,97,-3,-105,14,71,-114,112,124,3,-83,-105,-50,94,35,59,-63,73,120,-43,116,16,-91,-46,-18,-117,-108,-26,84,-84,75,123,-97,-21,-118,-119,72,34,-59,-108,-104,-65,21,70,63,-108,-35,-26,-11,-63,-55,53,-81,-125,-58,-115,-16,-54,59,7,0,-12,-67,126,-72,81,-118,-76,-13,121,5,27,-23,80,87,-125,-14,-85,-37,-6,-79,-56,-118,-19,-45,-43,72,71,-49,-91,31,-121,-90,34,89,-22,116,46,-62,-59,49,-4,12,23,40,-39,88,-54,120,12,34,26,-7,42,-18,-89,-37,67,123,61,-91,74,-36,-38,-104,15,113,46,54,0,28,100,-75,-44,25,-56,103,28,44,-92,-100,34,-113,28,-16,-75,-121,-7,58,38,-99,66,-2,-20,-122,-19,11,110,-58,45,17,-72,38,-45,41,6,64,-86,44,36,91,-45,-93,17,43,-73,-70,-41,52,121,53,-71,-90,14,110,115,29,36,-75,-46,92,97,-53,102,-88,-32,122,53,-39,20,-102,55,-101,117,-26,82,14,46,-91,-120,85,36,-108,101,-81,-26,115,-18,-50,-47,18,7,-125,-24,33,-46,-24,-108,33,-71,41,99,-66,47,-43,-25,10,117,53,-2,-14,10,126,-112,-74,104,-77,-57,-30,24,81,93,69,115,89,10,34,90,88,-116,65,-90,72,43,51,123,-85,55,-12,8,13,10,-37,-90,123,-4,40,109,105,112,64,99,-74,-83,44,104,-20,-16,25,54,-82,-54,-109,64,-37,-3,-17,107,124,14,-64,60,-47,-72,40,-84,-74,89,36,6,-98,-125,63,30,14,-70,-62,109,-38,112,-41,127,52,115,-56,27,-112,76,-65,-107,-118,26,-53,-74,-96,114,78,-120,24,77,60,48,29,49,-15,-117,-91,1,58,-26,-84,-9,-115,-109,-89,-21,104,82,36,116,121,-103,93,-50,-103,-39,37,52,-28,-108,49,-87,-93,-115,38,-37,-28,-68,14,-26,19,-41,107,-2,-37,-107,-49,11,-120,17,24,24,-100,-110,93,46,-122,-84,38,6,-7,-53,98,102,35,65,-8,-6,-99,44,86,-5,-4,67,-65,13,23,66,-111,24,7,19,9,-92,114,29,58,-43,-61,-105,-33,34,-26,-57,5,-11,48,77,0,-41,22,-49,-20,-44,-99,-30,10,45,-51,47,-29,20,-61,-11,104,99,21,-15,-67,44,108,-71,-83,-11,57,-104,39,-84,122,2,14,127,5,-110,-79,98,23,95,89,3,-87,68,94,-9,104,40,107,24,26,-97,-36,-111,-100,-95,31,-97,77,49,-69,112,-111,-96,-45,89,127,-9,114,85,-5,-102,16,-1,31,-53,-69,-53,-6,113,84,-6,62,-18,-44,-73,-15,68,-105,-36,127,12,-27,-28,-42,-31,51,-121,-19,86,-111,-86,93,-119,-74,67,51,32,73,35,18,-106,70,44,-82,72,50,-19,98,-45,-60,-84,-84,-67,-126,-5,-67,38,-2,-62,-23,-54,-110,113,-89,-14,52,28,11,-61,4,70,-35,-100,0,-46,-11,-124,49,118,-80,39,-70,-100,-54,-120,-69,102,39,59,16,-49,-50,53,-27,44,-115,90,69,-102,65,-113,20,-47,-115,59,127,-19,-19,-54,-27,-28,39,-94,65,-114,75,-115,-46,-85,-4,75,-67,127,-98,27,-42,1,-43,-124,22,-21,-74,-27,53,-45,127,-90,-83,-44,-23,-86,10,36,59,86,99,-126,-59,108,-99,-45,91,-16,-33,110,106,-120,-87,19,115,122,-86,85,-83,67,-4,-57,4,-111,-5,-58,-2,-91,95,11,107,-53,-68,-128,-12,-68,85,19,-40,-36,-56,10,58,-64,-12,-32,20,79,37,-65,-9,-33,88,123,94,114,31,67,-2,-32,86,-124,-62,-116,-100,41,35,-17,-81,67,-85,-110,83,45,5,-121,-120,-3,14,47,-65,-78,-87,-114,-9,-19,-7,-21,106,74,-40,117,78,-33,61,63,-70,26,-9,56,76,-121,-77,14,87,-125,-32,69,-101,50,104,30,-59,-117,80,43,-98,-11,-23,-94,-108,52,97,-38,24,-10,125,-41,-119,-19,-56,-42,25,65,-39,7,-102,-4,109,110,74,18,-126,13,96,95,99,-89,15,-3,6,106,72,35,-78,82,-15,73,61,116,-127,-83,98,54,-17,2,88,-7,-57,-37,-102,-39,-79,31,111,-6,-62,-24,69,103,74,113,65,-15,68,37,123,-65,94,117,-32,-121,-78,-5,59,120,104,60,5,68,-65,4,-85,64,-80,117,61,-101,46,-88,-123,69,-19,-57,97,-15,125,54,84,-23,-124,-27,-47,114,16,104,44,-100,-87,36,81,-27,-20,-73,95,-80,-64,-34,-77,29,66,-126,-120,77,105,-100,44,79,116,-18,-27,-15,-71,19,-80,12,-18,27,-92,45,116,-27,14,-14,-77,1,-110,-40,-26,-4,-88,-120,60,51,-101,108,-123,116,111,-83,1,-74,87,-69,11,124,93,2,-64,121,62,-45,-79,110,-55,-37,97,27,-79,110,-91,67,53,99,26,-74,98,43,9,-43,80,-103,-23,60,-36,68,-112,-64,20,-31,-52,-79,-113,-7,94,-30,73,-100,55,-111,87,-1,-29,-25,42,-94,-13,-63,108,-59,38,-16,-85,-62,-17,0,47,-90,116,-80,-11,12,-54,96,-110,-12,-6,-128,-31,-64,-109,103,-11,58,-118,-3,-102,0,64,39,-67,-18,93,95,-87,102,104,88,-31,-62,-36,-61,-105,-26,46,-53,93,117,-70,-54,121,-103,52,-24,-10,82,-124,-22,29,-122,84,-76,-64,121,-65,-6,52,80,-27,7,-118,108,64,-82,73,-44,81,-107,-88,84,-100,-59,9,-56,35,-39,-68,-82,26,65,-73,-66,-15,75,-44,-31,51,-65,-62,-73,100,51,-51,78,-112,-84,-19,82,93,-92,53,-69,-38,-66,5,127,-30,61,43,26,48,-63,31,24,-71,-67,-60,-127,-55,-26,-43,38,-63,-49,-101,-37,116,105,10,-109,3,-67,-42,17,-89,110,-103,62,-41,78,-59,-47,-47,-17,10,-51,-16,-31,-41,68,37,15,94,-123,101,77,-122,116,61,-96,-8,-122,-11,105,109,-74,-97,-111,44,114,105,45,-94,42,-99,-52,-113,122,87,-59,85,-109,-128,120,21,-49,-75,-89,11,-10,120,-51,30,-19,-79,-26,-32,64,-71,28,-44,-11,55,-28,59,109,-84,-22,-113,-55,-105,114,50,80,-26,77,36,54,42,-71,-111,-64,118,99,-100,-121,-128,56,-10,-75,-74,30,93,36,-122,16,-105,-50,85,19,-99,-84,-72,-20,-63,96,75,-53,-86,59,90,-23,-73,-39,96,-118,-9,-127,-106,42,-122,-84,108,-18,29,81,-58,46,12,94,-2,-94,33,-75,85,61,122,-100,2,101,45,106,-49,-43,22,-63,-128,94,-115,5,38,35,-8,54,15,35,-114,87,-76,110,-50,37,20,-114,115,84,-13,48,14,54,-58,-93,43,112,77,9,-99,32,-91,-55,-82,34,23,-40,62,17,66,84,-3,82,117,-100,32,33,19,-100,93,102,101,-33,112,-103,-38,114,-1,38,-89,-90,-9,-86,-101,-66,-71,41,-113,5,-40,21,50,89,123,-73,5,45,68,-75,58,-107,3,-67,-64,89,-117,45,51,16,36,-119,69,-78,94,-18,-18,61,-124,22,97,-55,112,-97,19,119,65,7,-109,23,88,-15,-47,-103,-62,-84,106,-5,73,-108,-109,34,33,-116,81,-41,81,-102,67,20,-46,67,-40,-9,-49,10,121,-57,-33,61,28,42,-67,-36,-113,-38,-89,-94,-67,-28,52,-17,-116,-96,117,-51,29,-84,-38,-53,-53,-44,-110,54,98,-76,18,117,83,10,-36,-62,102,104,124,80,34,15,47,108,91,-112,-116,-10,66,-68,55,-123,-67,87,74,51,-47,25,-34,-122,57,32,-96,96,-64,67,31,-41,-124,-87,76,-15,-125,1,13,-77,99,47,74,-44,97,67,108,-4,-9,-16,36,44,-53,3,105,-120,99,-55,-30,-34,118,8,40,106,-95,-122,14,-65,-23,86,-64,-26,114,89,97,-59,-10,71,-108,10,-60,61,-87,-19,-4,-28,-32,-1,35,-123,109,55,-47,-126,-124,-1,-36,120,-107,3,-17,121,31,-80,25,79,127,-32,-19,103,118,-4,21,-55,125,70,-95,-104,-2,-78,-24,90,97,-33,-79,-92,126,20,49,60,41,121,56,120,-102,113,74,1,44,-28,46,-19,100,-46,-127,77,-8,-64,-12,-13,-15,11,89,22,86,-95,36,-105,84,110,-83,37,-56,-40,-92,19,-17,-82,-25,83,4,33,-111,76,-54,-85,35,-107,127,-72,76,89,-123,-103,28,-96,95,-47,77,107,-98,-35,52,59,75,-76,87,-14,-27,-56,75,117,67,-34,91,-92,-45,-95,-116,-13,5,-81,-35,83,85,10,-112,-38,89,117,43,123,-43,-73,104,36,-80,-106,47,113,51,-82,36,93,-84,33,11,-53,-84,-128,82,-86,0,-118,-33,-6,-122,44,35,81,-44,-71,-73,-64,98,126,-20,-49,-104,-126,46,44,-17,-63,-62,-74,-48,-61,-28,67,-99,-25,92,66,-38,73,49,45,92,-69,-26,-91,105,80,-30,48,85,-76,108,-98,-95,-56,102,47,-70,6,-118,-31,-112,60,-62,89,-78,115,-85,4,-1,36,72,-17,-56,-100,-2,-104,-54,24,-56,-92,-60,-106,-115,-53,49,-106,85,33,54,-79,-77,44,47,-120,41,-60,-8,44,-28,5,114,90,42,74,-57,106,-81,79,-67,83,-97,-90,-16,-120,-57,-88,9,34,7,-107,-92,-59,40,71,113,-32,-85,89,89,33,-58,-78,-22,-50,58,96,-19,66,-125,-39,90,-42,25,70,-31,-104,-90,-21,118,98,-111,102,44,-35,-117,60,-62,86,-47,-4,-88,14,46,79,-81,6,-5,101,-12,99,96,43,42,-27,65,-3,-93,-120,112,32,-111,-6,89,105,-67,122,50,57,-126,-54,-46,35,-41,48,0,-98,-22,71,45,-125,81,7,-26,23,118,-60,25,101,-128,-95,117,22,-29,-126,74,86,-53,-39,65,-86,-62,64,-77,-8,-85,90,54,-28,124,-128,-1,-112,105,127,-124,-40,123,63,123,-77,-84,13,-5,53,-46,-31,-74,-36,-16,27,13,-124,-24,-98,-115,-83,101,48,92,13,-5,-98,-111,-10,-51,-40,-115,-81,-82,-52,24,102,98,97,109,107,-1,-46,109,50,40,-48,-23,71,-70,34,-13,-111,43,110,-41,-9,-1,108,37,45,-28,-72,-45,-50,121,9,-66,-4,-10,-86,18,16,-119,64,-36,33,5,-13,-125,93,19,-6,-61,126,48,95,-116,11,-62,125,-6,67,111,-1,-54,2,82,45,-103,-4,19,-66,20,18,48,15,94,-91,33,119,82,-15,-24,116,15,67,30,111,-106,90,80,13,-20,71,66,65,108,124,-104,-94,-124,120,59,-95,-80,16,-101,83,90,14,25,-96,-64,-38,-24,98,-17,-69,108,-89,-29,-30,-11,-101,99,13,53,-56,72,52,105,105,88,2,75,26,23,-13,122,3,-114,71,-29,-70,-9,-98,67,58,-122,87,7,126,-30,111,69,-61,7,11,103,-6,-6,-16,56,-32,23,94,29,-31,-63,-47,67,5,61,110,57,43,54,41,74,28,-65,97,74,-22,-115,-126,0,86,-50,-83,-3,-93,116,5,-29,22,21,-79,-54,34,68,77,-76,-34,84,-116,-31,-102,-13,-55,85,64,-42,44,-115,43,85,100,-60,-104,103,-54,120,-65,-69,44,-102,59,107,81,-79,89,-44,121,-24,70,-110,51,75,76,117,-7,61,110,-102,42,-28,-28,-67,-12,102,-19,-27,18,121,115,-46,68,-81,-124,-110,-33,56,108,-83,30,4,-97,-79,-17,114,88,-86,105,-9,17,0,61,11,101,7,14,58,-100,-38,-42,121,27,119,-48,62,56,94,39,-49,-20,7,26,-99,108,-44,120,87,-2,-117,-78,64,-56,76,-83,-105,26,21,-3,8,81,-74,-100,50,67,9,58,-118,-14,-96,-13,65,27,-122,-73,102,-83,-40,-60,-13,-120,16,51,112,-51,-81,-15,127,-7,100,-116,83,-20,-72,59,121,-39,-43,114,97,55,-9,-53,56,107,45,49,-102,106,-126,-54,59,-44,18,-64,101,-75,62,-123,-70,-110,-17,24,-44,57,-122,104,43,-119,-40,18,-107,-113,25,122,-19,-90,123,74,-35,-86,107,102,-22,-51,56,-14,-100,109,-124,1,35,-85,-16,-124,-65,-21,1,30,55,-75,67,-121,109,-78,-102,82,-23,-94,-60,46,0,-104,-96,6,12,39,101,62,37,-39,-84,-92,48,3,68,34,26,-47,-67,60,25,-2,118,-110,91,77,46,2,103,43,-85,-107,83,-23,-23,-71,-7,-110,42,43,16,-82,57,-55,-52,-102,-32,32,-70,-111,75,116,-11,116,-44,-75,-14,1,-123,-128,31,-85,71,33,-72,78,-102,70,-72,48,-15,60,38,56,79,93,114,-83,75,-6,-78,120,25,-127,112,82,-37,-90,-121,-92,-112,-35,8,119,-32,-35,58,77,-9,109,69,-107,-21,11,-128,-42,-70,48,-30,-23,-78,-81,30,-123,-40,-8,106,-127,9,64,-51,-78,122,95,-109,81,-15,-43,27,118,-92,88,37,-109,-106,52,-8,-62,119,-45,65,73,127,-96,-115,53,-125,46,47,89,115,8,71,70,-40,-107,24,15,-119,-64,115,41,54,-11,-103,-108,-20,6,104,-67,-8,95,102,90,19,15,73,-22,13,-7,55,113,-53,-123,-110,51,40,37,-83,-103,-61,34,59,114,-25,-113,-103,87,-26,-10,-121,88,-65,-79,-63,92,123,-62,31,59,-87,-11,113,31,14,88,25,23,35,-49,-83,-21,-59,53,-72,109,-22,-64,59,89,-104,-42,52,24,-60,62,3,91,7,-21,15,61,-117,-109,-1,65,-39,25,-37,-34,26,-2,-51,62,61,24,-15,50,-32,-48,25,-55,36,24,99,6,94,-25,-84,86,-30,-95,-94,-102,-53,29,65,-81,69,-85,117,65,-7,0,-66,-23,-75,127,-108,62,10,-5,66,-4,29,-59,-82,41,-55,58,9,65,-128,55,-58,-67,-28,123,99,-121,-70,-99,-6,11,122,-108,-18,119,1,78,103,61,121,-104,-68,117,-22,-108,31,64,-68,-68,-96,52,41,58,11,-54,-26,118,14,75,-54,21,60,-119,-66,-19,11,-64,-5,76,-97,-9,81,-126,62,72,-115,64,117,23,65,73,-87,-121,-40,-48,90,-82,73,-91,57,42,-53,54,-11,6,102,-104,-117,0,70,52,-56,103,104,-1,-12,-103,32,59,12,123,-75,-104,-123,16,31,-35,20,55,-116,-109,-44,-50,-63,24,76,35,-116,-29,16,-32,-43,-68,-115,-56,32,109,-34,-9,126,-39,74,-74,-46,-19,-82,-105,-115,32,94,17,105,-103,68,-50,-121,-29,53,-7,74,77,98,-123,-68,37,-8,62,-21,-23,4,-99,-80,-103,45,-58,-2,-95,5,58,35,19,-65,-37,108,-14,35,-90,-53,-123,-5,28,39,-21,17,-38,70,-53,94,30,62,24,34,-74,14,101,20,46,-61,94,125,-121,-122,88,36,-127,-97,-98,80,110,80,14,10,72,8,95,50,4,113,27,54,-124,-117,-48,-39,122,52,8,61,94,40,-69,-34,21,7,-56,-123,-90,24,23,89,57,-87,-97,-16,-80,63,-50,-118,76,-25,-17,24,90,-4,-112,-94,32,58,-32,11,-12,28,48,118,-38,-69,107,61,92,-104,116,-112,-62,55,-110,127,0,-46,-54,17,-57,116,54,-90,-36,114,-39,53,-32,33,-69,72,37,-70,121,-84,60,22,-95,-105,-74,-7,-67,-49,-41,55,98,60,-57,-51,-107,48,31,48,-72,-35,-38,-5,29,-102,65,78,79,71,-8,-113,122,76,90,-55,-31,102,77,-66,107,112,-128,101,122,-83,-62,111,126,-75,101,-55,-118,52,68,-128,115,63,76,32,-6,6,90,100,-109,98,-59,19,109,114,-1,84,-58,79,-52,95,121,-77,114,-52,56,-13,-114,67,91,50,-51,-94,-115,113,-58,-33,56,-92,55,-120,80,-125,-85,126,-114,-126,44,22,-29,-82,113,-92,91,-39,63,-34,-90,43,-21,-3,113,-81,-5,-91,69,-59,120,-126,127,43,66,113,-111,-99,47,-46,-73,-13,55,-7,73,37,110,-76,68,105,13,94,-36,10,108,-127,-76,126,10,100,21,-80,-117,21,-95,-79,94,77,-72,98,-63,24,93,7,-124,25,-15,-62,84,-99,28,-99,-82,113,-65,62,13,-51,-117,115,37,-125,-40,85,-96,70,31,26,-27,2,57,43,-15,-112,-36,-5,-72,106,44,-97,126,111,-31,-89,-66,76,-114,-111,51,120,69,-106,56,-70,1,-54,105,-56,-8,-92,-123,-71,40,-52,-20,-93,-102,-104,76,48,77,-30,76,53,-113,-16,40,88,44,-107,34,53,18,-21,95,123,-115,53,-28,21,47,82,76,-58,-114,-104,22,-97,-90,109,73,7,-108,-30,-96,89,-84,-47,-46,-62,110,25,-128,-54,-75,-62,55,121,42,-62,69,54,25,-75,7,122,87,88,-68,-83,-95,-100,38,-103,-96,74,-57,109,-34,51,72,86,89,120,66,85,18,95,-84,101,-86,15,-32,48,-104,-99,62,115,43,76,-14,76,-92,27,-5,-8,41,-74,-114,50,-77,-97,-67,-109,16,-36,106,-52,85,50,16,-68,-27,-99,-22,-112,122,-15,63,64,23,121,23,54,-31,126,64,76,16,18,-57,-75,97,-94,-23,-94,72,-40,-53,30,-55,87,-63,-13,116,-64,9,-72,11,-45,-90,11,59,110,44,28,-105,62,-80,-27,20,-7,46,45,57,35,5,126,29,-91,77,-65,-60,-56,10,-115,-42,115,-17,-67,34,12,56,39,-119,-20,-66,22,-39,54,-102,108,1,107,-75,14,-104,-127,-87,-17,-88,103,33,-71,-85,-76,23,-95,-94,-102,107,92,-96,61,121,-98,78,-33,-28,33,75,-10,32,-14,-125,-72,-96,-4,10,-65,7,-52,-27,92,-71,100,61,87,45,9,-43,110,-52,-70,19,45,-110,-66,-74,91,-126,-27,106,-110,58,114,-86,-52,-77,-63,-50,-65,67,-54,33,116,37,64,49,-7,76,-115,22,-124,-105,50,19,-126,81,86,124,-37,-5,-48,19,32,-65,-21,80,-93,-124,-23,-25,24,16,97,65,51,29,56,-79,-117,80,-50,14,-77,-23,87,96,-52,125,49,2,55,13,61,107,-106,93,-116,102,-37,-11,-23,-119,53,-43,-39,-86,-96,0,19,13,15,15,112,24,-73,76,79,-76,99,-127,90,-18,119,63,3,-29,111,38,34,-66,-34,111,31,-29,24,-95,-70,5,65,-15,86,-43,16,76,-127,-120,6,21,-29,97,-31,53,-57,-39,83,-117,-48,-99,126,38,56,-78,67,-18,43,72,-96,100,-37,109,-92,89,94,-88,36,121,112,-33,-69,-42,-99,112,-80,116,-42,49,20,5,124,26,26,-32,-118,-28,22,65,13,-105,81,-98,124,40,-76,52,-104,97,59,82,96,-99,-46,-27,-74,-125,-36,64,-31,114,-83,-28,-61,81,8,-81,-49,42,48,36,-81,12,-80,68,83,38,-115,-46,93,-86,62,-56,-52,-36,7,-88,-85,-80,38,5,-106,-8,-125,-94,-81,123,122,21,-112,45,-37,116,81,48,93,-122,32,-120,-28,48,-85,-99,-47,50,-67,-109,-14,78,-79,10,56,-98,41,-22,10,-20,74,94,-120,-30,110,50,86,74,91,51,43,-86,-44,11,65,-11,127,-97,-31,-24,119,-16,-66,-73,87,-95,-64,109,98,-127,-30,45,24,-11,54,61,76,109,126,24,45,-1,64,-24,-28,28,114,-113,-32,-103,122,-125,95,102,-7,-33,-25,-28,-7,-101,63,109,-9,111,-45,73,-41,-111,-48,-70,-113,-40,28,-32,-95,-41,76,33,-53,-112,-106,75,71,117,-94,81,19,19,53,96,125,-9,-82,40,85,6,65,36,-91,68,59,9,91,65,-67,-34,65,121,125,-25,-107,-38,-106,-122,20,-83,109,45,-103,122,-31,-42,-42,84,23,-57,49,-69,27,41,78,-116,3,-65,59,-28,-52,-101,-91,-29,-29,37,113,86,119,-51,-19,-104,-84,42,90,-113,125,-32,37,65,-21,119,126,11,-13,-37,59,-49,-80,60,90,-114,7,-117,-84,-22,-50,4,58,69,-93,106,-77,110,-46,125,78,93,-124,-20,-42,73,75,-60,-59,-52,80,-5,6,-105,-14,-58,-59,-72,34,59,-46,-96,-102,76,105,-8,-49,-79,-81,-47,-94,93,-100,77,-119,-115,-102,-115,-68,69,-126,107,-86,-103,91,83,-26,-42,73,-84,-54,5,-85,-104,-61,-28,22,100,-71,-126,-43,97,-128,38,88,41,112,94,-84,39,-55,-119,36,-115,60,107,87,1,-45,-114,-9,-80,88,-105,-67,-91,90,-111,-96,95,-113,-103,-24,-70,91,-113,-70,-122,-83,-92,-20,121,117,37,-105,-10,126,82,81,89,-2,-118,36,-21,-9,-85,124,-103,65,-6,118,-45,-33,-5,-113,122,124,87,58,-30,-47,-43,54,-10,-116,88,-17,44,29,94,-106,-59,41,54,-86,101,98,-116,106,-12,-12,95,13,-29,-103,72,55,-73,6,122,-106,124,79,54,-93,17,7,-101,69,-72,-102,-43,31,71,-44,92,37,28,-104,127,54,-7,-50,-74,-35,-125,-16,-119,28,-17,-44,122,63,117,92,-23,82,14,-28,122,-38,-90,26,88,-74,22,127,115,111,-128,61,-41,-104,-9,31,112,37,29,53,-3,58,52,-27,66,-76,-73,27,78,92,-33,-125,39,110,95,-96,-61,-125,-16,80,-107,101,44,63,114,47,-101,-47,124,21,-31,-99,-57,24,46,-24,18,121,-104,68,-113,37,-76,-71,102,-10,59,-124,112,123,121,91,78,-17,-14,32,-82,49,2,102,-47,-83,-30,-19,-3,67,-50,-42,41,-92,-21,-72,117,-111,-74,97,26,-26,18,-78,104,41,67,48,122,108,-19,105,64,-111,-45,-45,43,-80,-66,115,84,81,-36,-31,59,60,28,-10,125,72,30,-64,105,52,45,-74,11,38,-16,-118,-3,-46,98,-77,40,70,-69,-114,-77,-70,60,123,83,-102,-80,42,100,109,81,-77,115,7,-127,-87,-22,-48,8,57,-72,-41,-41,-9,3,-54,80,-30,103,-54,-16,118,105,-37,-87,22,71,-48,-33,121,62,-90,116,66,-38,-105,22,19,-21,-41,83,112,-39,-28,-81,-109,31,-125,-95,-1,54,-84,72,-108,112,89,-114,120,-73,110,20,-55,-126,-93,-58,68,-105,-107,65,122,8,-103,121,-97,61,-74,97,99,-65,1,46,7,57,69,-122,100,-112,94,-94,116,23,85,106,-105,79,-108,-128,39,-111,83,-87,-66,112,-102,24,-7,-72,-78,-97,-8,99,-113,-114,79,115,-51,89,-88,83,-90,28,56,113,-102,57,40,-104,-76,89,-8,38,-5,-67,-9,-18,38,-121,27,-25,-110,-29,3,-10,123,16,-40,-93,-36,116,-20,-73,-111,-18,87,-123,120,113,-121,-97,-47,69,105,-68,-97,-111,-53,-94,114,-81,77,92,-37,46,-80,-18,-9,108,-69,-25,-46,27,-101,-86,54,53,-109,-44,85,-11,-61,-87,34,-17,-25,79,-46,101,-22,-30,85,99,-65,-30,117,12,-80,-23,-16,54,106,-89,-120,-29,64,1,-94,-111,-75,82,-3,68,120,11,-103,-52,87,22,-46,-17,-117,-63,12,112,-123,-52,-121,71,-122,-55,101,-125,-41,105,-53,52,-9,60,-3,56,-1,85,15,-112,127,70,-7,4,48,-72,-29,34,11,-103,-46,114,56,-109,-32,17,9,89,-1,114,92,86,11,-55,-87,-80,-18,53,-4,42,86,-90,15,-50,120,49,-46,22,57,67,-59,90,110,-97,96,119,100,43,-90,-54,81,-89,21,-80,64,-14,-47,126,92,-17,-37,51,121,40,-34,110,-54,-99,36,-73,-43,85,52,-30,121,-9,-18,-51,91,102,-116,-71,86,95,-55,95,-35,74,118,101,-114,87,20,-48,-60,117,-76,55,-108,49,74,-22,20,-43,41,79,114,-96,-12,-68,43,-44,126,-28,83,19,111,-128,-19,102,-110,56,-77,71,89,17,-26,-16,32,-27,-14,-127,-37,62,-107,-34,126,110,74,104,6,85,8,79,-74,107,126,30,-52,80,29,-11,108,65,29,-128,109,-2,59,123,28,-107,62,110,110,-123,71,-68,-39,-20,-108,-57,38,-36,-12,126,100,112,-32,-103,55,98,-82,-5,89,-41,36,88,-92,99,118,-56,97,12,-16,113,88,71,-96,76,-77,117,60,-5,-84,23,-41,45,31,46,0,33,-3,69,4,38,-119,-20,96,-115,-50,28,-38,-9,85,-113,36,-106,3,-96,-23,-80,7,-19,-111,101,92,-107,116,-9,53,-120,-3,5,-13,-87,-115,1,-35,-125,-23,-89,19,53,117,69,-67,-107,-122,-33,-32,-10,-122,-69,75,-116,-35,-69,43,-74,109,-107,18,107,-48,-85,52,-38,50,83,115,-101,5,-39,62,-7,99,-46,97,44,78,31,27,105,-72,-117,-94,-69,-86,108,-59,-30,-48,49,-22,-124,-114,-2,-19,-126,-122,-29,-21,67,60,15,-111,-55,-22,35,81,37,-75,32,0,56,47,-18,108,41,-120,0,122,-4,51,95,-68,-20,125,78,77,119,-115,-9,109,59,-128,79,-124,-114,7,9,91,-8,11,-80,-112,29,-56,-32,11,-50,29,-82,74,-19,-6,-55,12,-115,18,-6,15,-123,-15,72,-62,12,43,1,82,-30,2,-17,26,-30,58,-85,63,-56,-100,-117,52,-90,-69,7,-26,121,111,-92,5,-61,-90,96,63,-18,60,-11,-52,-81,125,99,25,67,82,-71,110,97,122,51,39,33,93,28,-116,123,48,-107,-64,-9,-31,92,-62,-68,-103,-102,-107,48,-2,-100,83,127,41,-82,-105,-7,113,-120,10,58,-122,23,84,-18,20,-37,-82,11,46,42,-95,16,-58,-105,-78,62,-57,-82,39,-18,0,106,52,-51,36,-59,76,98,-108,124,-67,-40,-3,73,19,45,121,-45,20,76,-21,0,-57,46,-18,90,79,66,-56,-42,-47,-39,90,-120,79,103,34,-104,-30,-67,94,120,35,59,-41,25,-128,125,88,88,68,-48,-47,-25,-10,-12,92,125,20,-99,66,55,118,-42,46,114,67,-9,37,43,119,-84,79,-8,-21,123,48,82,76,-63,-23,-17,27,-108,97,53,95,-109,68,41,-50,-32,-119,-20,-71,80,-9,-57,-16,-4,17,-36,66,19,-113,82,-76,39,-128,23,47,9,30,-87,-35,-48,96,100,15,-4,-86,-58,-10,-1,83,-52,17,-102,37,-88,-13,-2,-23,-92,-52,-89,-33,-112,-47,60,122,28,-101,-99,92,-67,-88,77,101,118,-96,-123,-108,-108,-43,102,44,45,-48,84,-25,110,-74,86,-7,50,-109,-9,59,-92,-67,79,23,29,53,-57,-89,73,9,1,65,81,17,31,8,-107,92,126,-119,53,52,98,-126,60,-82,15,-15,79,110,111,22,-82,88,-110,-49,-113,-124,-127,-51,88,-48,-87,-17,-55,62,45,41,64,-111,-95,-122,-46,-91,116,-55,-125,103,75,95,-29,-56,29,-36,-115,-41,-56,-100,88,-81,-33,29,-81,-11,-90,77,-17,-10,-127,-6,-121,30,-4,30,-24,-124,109,67,112,25,-57,34,4,79,126,-109,126,-47,-101,-9,-38,117,-76,-43,37,-120,-86,85,54,-70,56,-15,39,-40,-80,3,26,-64,-45,-69,-35,-120,70,24,-97,-29,-53,19,69,-113,-112,-78,-53,-106,-74,-61,94,78,-57,97,-58,46,58,-21,62,-121,-97,-16,-38,35,35,-127,-120,125,2,54,-30,-44,-17,30,9,-20,30,117,-53,52,29,95,-92,16,60,-29,102,54,-66,122,-110,10,-113,68,-78,-120,-71,111,-96,-37,9,-11,39,111,-52,107,-25,-77,-9,81,28,0,-55,43,-98,-97,-37,-123,69,-4,23,-98,102,106,-11,-42,98,5,115,-121,-84,-86,-78,-69,11,34,-115,-94,3,-104,-9,51,-38,-113,29,-39,83,86,54,-116,-27,-108,61,10,27,-44,65,-91,-86,34,-40,99,38,-14,101,126,-82,-56,-8,37,-102,-52,102,126,-36,74,95,113,-83,-37,-66,-20,-55,-98,-115,-49,96,-44,-123,20,-1,75,-2,10,-90,-61,107,87,94,-63,74,-55,0,2,41,-123,-103,-85,-13,-107,-39,36,-47,6,-21,-70,98,78,-119,52,26,8,-40,72,117,115,-78,76,-57,-60,43,-25,-87,83,36,54,127,-78,127,19,98,125,-30,86,121,62,124,-32,-96,20,-110,97,-126,13,-104,6,-122,36,-105,55,105,-48,-121,-83,0,18,-113,-114,-39,20,9,-20,-23,-49,-115,83,-107,70,121,-30,86,-48,31,-23,125,-114,-67,48,-86,-90,21,83,-79,-107,64,-60,-91,69,54,-73,-77,99,88,-10,15,57,-29,-128,-47,101,-96,-50,112,-85,120,-16,-78,7,27,116,-128,-11,18,49,-19,-33,41,15,-35,84,-67,-15,-57,-73,36,41,15,9,77,83,39,27,-54,-82,33,4,115,-60,101,-117,46,-56,-18,100,74,126,-27,-25,-48,10,-51,-41,126,-81,-95,9,-60,85,99,80,-6,-16,27,108,77,44,46,114,-26,20,-69,15,92,98,107,-59,-114,-87,28,-121,-61,84,125,-125,-44,-13,116,-120,-55,94,-84,-86,-75,34,1,121,-25,-80,26,43,-97,-12,31,-58,75,84,2,-109,12,-61,-68,110,-21,92,-27,13,-117,36,21,107,-3,-125,80,87,45,-108,22,-61,41,75,-115,29,-29,33,-111,-4,-22,-94,8,24,97,-124,25,-52,25,-7,-74,-36,108,-114,12,3,-32,84,75,34,-60,-88,-10,96,84,12,17,114,-119,-41,41,-48,-3,-16,1,21,-14,-115,-11,-25,96,-36,10,-71,-14,-3,-83,6,85,-91,-18,-108,81,36,-33,70,-59,-80,-81,-31,11,19,74,-22,107,91,8,57,29,-95,-80,61,-40,-82,-110,97,122,-114,-102,-77,123,83,122,46,-24,-121,-28,111,18,-47,-35,-102,-120,114,-93,22,115,-82,113,77,-78,76,-66,65,117,28,86,82,27,79,-128,119,-88,63,-31,11,87,124,-10,-71,-99,94,-89,-82,76,-124,101,-53,58,-74,9,-50,-114,31,-3,-119,-51,57,-29,92,-75,113,-47,-103,40,-81,-43,-100,-12,-102,4,12,-36,-26,-70,27,-118,-88,50,-73,28,-113,-94,122,-1,4,-57,124,-126,100,70,-87,62,7,-91,-91,100,-102,-56,102,34,118,44,-90,-47,24,-32,30,-99,-98,36,113,-124,11,-126,-84,-15,72,117,3,-46,-18,97,-73,-38,24,-47,-4,109,-50,-86,-112,88,-97,-65,-73,112,72,-37,-125,20,-29,-43,-2,51,-16,94,58,119,-101,-48,121,-116,94,103,52,64,48,51,-70,-113,106,41,82,-44,111,-106,-62,71,-105,-66,78,-78,71,115,-50,-123,4,33,88,22,-40,-111,-46,-82,-34,-67,-58,120,-28,-18,-52,-126,-31,-109,11,84,-94,10,-15,94,-89,-106,125,-62,-6,98,62,-39,-11,-34,12,12,-18,-50,-78,-60,43,104,50,36,-62,-58,-36,-14,-104,-88,78,21,-18,43,-118,-124,-68,-35,-62,52,102,18,87,25,-106,-78,29,74,127,98,-2,-99,-86,37,80,6,-31,86,112,77,-51,121,-126,70,7,35,3,-85,-24,-78,114,-109,-25,-58,120,-127,-78,26,-100,8,-116,10,-20,-23,14,-18,120,42,-75,79,44,60,-58,102,69,-104,25,119,103,28,-70,22,26,25,124,3,-15,-11,10,87,-23,120,-68,-44,93,7,9,-8,-15,125,-79,-70,15,108,-66,-90,-5,-82,-14,115,-75,-122,74,127,108,-100,4,58,-106,66,-117,1,11,6,-69,-96,-65,55,-8,102,-41,-72,75,76,16,-2,-10,78,59,-42,-72,-1,-31,-100,113,26,-66,48,-4,103,57,71,-94,-2,14,-28,-36,22,-8,-25,39,-51,25,99,91,70,63,11,-124,69,46,-34,-21,99,-70,-110,-90,32,116,34,-74,82,43,-104,-56,31,-117,-43,67,12,-72,115,-84,-62,-9,21,-30,105,82,94,86,12,40,-47,-39,40,-114,-67,-89,-72,-64,-62,-124,-105,32,95,-124,-41,-14,48,26,8,-116,-57,24,-45,-45,-75,-40,-111,-118,107,116,66,-97,-57,-79,-96,-85,-55,49,-55,-32,-87,-76,-12,42,-85,85,-16,75,-41,-112,49,-29,-28,-124,-10,-60,62,-2,-112,15,-36,-33,81,-95,117,120,51,99,-64,30,11,106,-21,-42,43,-59,51,117,12,45,3,-116,110,88,104,60,67,102,-74,108,80,-58,-108,28,38,-108,16,63,100,-24,-36,-1,70,97,7,32,118,-112,-122,-31,-36,106,10,115,-89,35,58,-15,-5,63,19,-123,-99,-11,-94,108,-18,-13,70,-12,-1,126,-15,-9,-25,113,111,66,-59,81,-88,-114,97,-121,-76,16,8,72,62,3,-107,106,-43,92,-91,63,60,-90,-61,96,-9,93,-24,-17,-22,38,-24,29,-27,-36,-25,117,99,-10,76,66,-77,-71,33,-87,100,48,-13,-122,-49,56,-104,72,72,-84,103,72,115,-10,45,19,-22,52,-97,-77,-107,50,-81,-93,-79,102,-71,46,73,6,-21,-52,5,-96,32,112,15,-44,-4,110,5,-26,-85,89,-87,35,73,-17,59,-95,-5,-123,94,127,-83,9,-122,-64,-58,-72,-111,33,-91,-82,56,63,1,6,-67,-106,-55,26,-12,-105,-32,115,-38,-95,118,117,67,-17,95,99,120,-75,2,28,-113,-105,117,-15,111,22,-46,116,25,-91,40,44,84,37,-4,-66,-125,15,69,-14,49,-12,-11,87,-68,20,91,110,117,125,-65,-34,-36,84,-29,-87,-27,60,-66,-118,-125,49,69,81,54,7,-119,53,-23,-60,-9,22,-116,-125,-58} + +#define IP4_WEIGHT_Q15 {18,-12,-44,78,104,-34,61,92,-120,-75,40,-19,29,-80,-56,21,60,-92,107,-118,58,-104,94,47,62,106,11,-105,-6,-20,-32,24,43,43,-116,48,53,-86,-50,-38,-108,-80,0,-73,-5,115,-26,111,78,76,-101,-55,94,39,-61,118,94,13,-20,-81,100,70,-111,94,-125,63,71,-121,-70,-69,-14,-74,54,-121,60,107,-121,-106,51,-38,-61,26,110,103,-43,94,-116,111,60,-125,-28,88,83,120,62,-39,-79,112,-85,34,121,-93,-121,97,-45,-97,-90,12,-97,90,109,-45,-59,-100,-105,-21,0,-26,-122,-37,28,35,-10,-115,-87,6,-62,108,-15,26,118,-84,-26,1,-74,73,-41,-65,97,86,94,67,34,59,-99,106,-67,-80,-26,-71,-21,-20,115,109,-43,-107,-21,64,37,-2,-20,-75,115,108,53,35,-102,45,83,-106,-49,-59,-46,-102,121,-41,51,-55,22,19,-58,-103,-116,80,25,-126,122,-76,-7,-34,-2,110,15,-46,82,-16,15,-19,-52,-39,-73,62,93,67,117,-27,62,-12,-89,-15,-100,-57,59,20,-127,52,-37,-79,-41,-43,111,-31,99,13,-12,43,99,-1,-31,43,124,-15,-30,120,-69,-79,-36,-19,-89,89,46,116,54,-46,49,94,85,67,113,11,24,-59,-17,119,-119,110,-57,-81,-1,77,32,118,-38,-13,113,-53,-94,111,110,-19,-14,-53,4,117,-20,-35,121,24,-97,119,18,-31,108,54,30,-74,-121,16,101,65,3,107,-12,-38,14,-53,125,60,-59,17,52,21,-65,-118,76,91,-112,106,-38,98,26,-4,-53,-63,-108,95,-58,63,19,111,-74,73,37,63,-115,-84,-44,22,-47,-51,60,9,29,22,-57,81,-87,-27,-65,-63,-93,63,110,-26,-126,-12,7,-118,-127,-113,-70,45,107,103,-69,-48,56,25,55,-55,79,113,111,120,-2,43,108,-122,-41,93,40,44,88,107,-78,-34,124,122,63,-67,29,14,24,-69,-72,67,108,26,116,88,90,-48,93,-103,-37,127,-24,115,-76,-80,-97,-61,96,-54,-22,-14,-123,-49,62,-17,-1,21,-65,116,10,113,10,30,88,-24,-119,-95,89,58,124,-119,-112,-115,88,57,119,68,-17,31,-27,-9,-64,18,-26,109,-60,4,59,-89,-127,8,-35,-90,88,-76,22,109,-123,-51,88,-90,18,25,45,47,-80,75,-66,-24,-109,-47,-42,68,-8,-98,78,-122,19,33,-72,94,2,-109,-84,82,102,71,55,-121,19,76,76,93,66,-42,-23,-2,40,3,106,123,-111,8,83,105,117,121,-52,2,-4,-18,-4,-19,-125,38,80,83,25,-64,123,47,36,105,29,-71,-72,-127,-41,-82,31,3,-43,9,73,124,91,-3,-99,-27,101,77,-51,-96,60,15,74,54,35,-119,116,53,-4,46,-29,8,2,93,75,-18,38,49,40,30,-30,22,97,97,-8,-35,-111,21,-62,97,-96,-12,82,28,-118,87,-12,29,-16,46,110,8,95,58,40,41,29,105,-58,-108,-29,-117,36,106,-118,11,-124,60,84,-83,-87,21,53,-31,125,-5,114,-75,93,-41,-127,-98,49,31,96,64,-112,60,-126,2,69,-73,94,-23,-100,81,-115,-116,94,-25,-44,46,91,-89,12,-47,75,107,-77,-82,-10,79,-70,-106,75,-1,62,104,-69,-7,-41,73,53,-32,74,26,-113,111,-115,-55,66,20,-91,7,-47,51,-96,126,121,-75,63,81,-23,14,-124,-41,-39,-13,14,-27,16,-56,-48,-43,-84,120,33,41,98,26,-6,18,15,8,31,-9,-50,121,-107,-106,-33,-46,64,-19,127,-104,-59,86,-30,-121,60,-79,39,-38,-5,85,-119,-17,21,-120,44,-22,89,-17,73,-102,49,26,-73,-69,91,-71,-36,103,63,-8,125,61,103,-116,-20,11,105,-116,15,-78,-122,-80,-62,-80,-58,65,-119,-47,99,-26,-111,69,87,-38,-15,-44,-87,-14,-84,-37,-27,109,-90,-72,-4,-110,38,82,-97,-50,29,61,52,-44,-87,8,63,83,92,109,-124,-47,69,-110,-70,111,-10,25,15,104,80,66,32,-70,-16,-49,-52,-16,-41,122,104,22,-31,-109,18,62,102,125,-123,74,121,5,92,-92,-90,72,-61,98,-2,-125,-81,101,109,-120,60,58,10,53,94,38,-25,-56,-13,-80,80,-13,45,-77,-43,-44,-37,-62,46,38,-103,-124,-93,48,76,-82,1,73,74,67,63,-59,-26,76,116,66,70,-113,-30,106,109,25,75,-18,25,25,85,-83,81,78,-50,99,-53,-125,-68,44,-104,96,-44,-126,124,33,112,-75,-29,-9,-60,-126,-84,-119,-61,-127,-6,-46,-26,-57,118,105,-4,21,-120,54,-121,-35,-70,-101,-124,-79,-33,-30,105,57,-108,-48,-111,-65,-108,41,77,112,111,118,68,0,22,110,44,56,-91,-49,-111,62,-54,78,83,66,38,102,-14,41,52,14,-94,106,105,24,27,53,-40,-70,60,-119,56,-95,68,69,59,-101,-124,-25,-119,-45,102,-55,-38,61,57,104,-96,88,122,99,-122,77,106,122,33,126,-5,-74,46,116,-52,-51,-101,74,74,2,-3,-21,-38,68,-30,17,96,71,-124,-23,47,64,-35,24,107,49,41,-50,-23,88,19,55,-30,-91,3,-54,-14,125,10,84,-96,100,100,67,-116,-40,-124,2,53,-62,45,72,21,82,10,-47,-126,54,-84,-50,13,-2,-66,-1,103,96,-17,123,59,-111,-61,-70,-20,-57,54,-94,-110,-125,3,-101,14,-128,-86,80,-44,-94,37,113,123,-104,-9,-87,109,111,120,33,-7,-62,-51,-57,49,-71,3,18,-49,-94,-32,-92,40,-52,3,52,105,108,123,40,1,2,-86,38,-104,52,-93,-44,-73,-62,91,-88,5,-91,-61,-24,-40,-30,-48,-115,114,62,-128,-85,-93,-43,104,-20,102,-103,-52,-56,25,-103,49,-25,10,84,-52,51,-94,-110,26,-108,1,30,32,-23,126,-112,-82,86,-102,-17,-108,-32,78,32,80,-125,-112,91,8,-69,24,-95,-86,-73,-115,14,9,-2,-121,101,-109,-72,1,54,84,-36,25,95,-49,108,-110,4,24,126,66,-63,56,-8,99,-10,-80,-73,5,72,-103,-10,-35,78,3,42,-61,-83,-115,-99,84,78,20,30,-66,-88,97,-120,-66,120,-46,-29,-57,118,15,-94,-110,-29,25,89,113,-110,-52,90,-92,105,-30,48,92,-44,-1,-39,-96,118,115,37,-3,15,-1,-2,64,81,57,-47,24,-14,89,-103,48,-127,-95,-100,-114,14,-69,-82,-32,-9,-77,-38,33,-76,-63,-32,51,69,-8,26,-75,80,59,101,-31,40,-37,-23,76,-110,-23,-83,-84,111,-31,124,122,-56,-67,-112,4,-123,65,67,101,12,-23,-12,-43,54,-87,35,66,-89,-47,-105,55,100,19,-80,21,-76,-85,-117,-61,19,107,-71,42,86,-9,-80,33,-65,120,106,-49,77,-34,-38,-50,-27,21,-28,65,97,108,-77,42,120,69,24,127,-20,89,112,-66,-126,-110,103,43,0,-63,28,-17,36,-43,-68,-117,115,-69,70,107,2,94,95,9,-83,-99,47,53,80,-105,28,-27,119,59,82,95,-94,-16,-49,15,-122,16,-89,17,64,-6,88,4,21,47,-78,50,-25,121,-36,-47,72,-21,-101,29,9,-83,28,-113,-68,23,115,-67,-101,-101,102,-98,-124,-98,-89,-24,82,-28,40,-89,125,23,83,97,-53,-7,-108,-90,-83,-113,-26,-58,-119,28,97,35,-74,6,-15,-40,-10,11,-98,79,101,101,-72,8,-99,117,80,-65,127,95,15,60,-29,2,-92,60,-118,-116,46,79,-79,-62,-43,104,73,107,117,-43,-127,-67,113,44,-41,67,-98,-73,26,74,59,-111,79,45,21,-60,-26,18,-72,54,-70,-30,10,114,-82,-124,-126,-52,-97,108,120,-19,-111,-52,102,10,18,99,49,-128,-17,91,-46,83,-76,-3,-41,45,47,-72,3,-19,112,-104,122,14,-77,-35,-23,121,41,-123,-2,-60,50,44,84,-45,69,-58,-69,43,-98,-11,-17,112,-95,-36,-69,67,-52,-11,-45,98,-126,-33,81,51,101,-38,67,68,-37,-78,12,107,105,75,-100,-109,-55,0,11,45,-24,3,54,-70,77,-63,125,52,93,-16,-22,-97,35,97,58,46,-61,66,-98,-61,12,-43,-63,-45,-36,-79,41,-58,54,-49,48,-63,-33,-110,-49,-36,93,73,-78,-33,50,-76,-6,-48,4,-87,-88,-81,-30,-33,-109,10,104,-94,94,38,-124,30,6,102,37,97,56,73,-106,-18,84,70,4,-31,-27,-90,54,63,50,10,-18,-113,125,-116,-86,-119,64,33,26,-128,-25,-77,76,-127,-79,0,60,-65,5,-63,-5,101,-91,69,-49,67,71,121,-22,59,-87,26,66,-26,7,-79,-73,-51,0,-114,-22,40,-115,-87,29,-18,-23,-72,-96,-55,-119,69,68,-102,-99,124,16,74,-34,5,87,120,-28,-6,-92,-111,-42,-85,-36,123,-86,-52,83,-77,-15,43,124,59,-81,103,96,-80,41,0,-62,-22,-13,77,-99,71,-121,104,72,43,107,4,80,-62,54,-98,-63,-13,-92,10,-119,-95,-76,-90,76,78,95,-108,-117,122,-115,88,52,-10,26,122,39,101,-80,12,107,-108,36,-13,-72,36,82,63,119,-57,-44,-7,77,-55,-25,-54,102,-118,-93,-91,58,11,11,-30,80,-62,-77,111,3,105,39,-63,-50,-33,-6,29,52,-98,-80,51,-5,-50,-122,93,116,-77,-45,79,110,-103,-20,-123,-16,-58,93,-101,-11,57,24,44,-60,-118,64,32,80,3,-25,107,60,126,124,-90,-22,-95,-91,-57,83,-46,1,-28,78,-47,74,15,42,26,113,42,-76,14,20,33,-93,37,107,89,-22,16,23,-16,60,108,-117,74,111,52,78,-97,53,-127,123,9,-78,-15,-17,86,5,-17,-120,28,-76,69,13,-76,120,-64,-35,-17,20,-98,126,-42,-88,-99,10,-113,44,84,115,-35,18,81,2,99,-82,74,-125,12,110,55,-110,31,-94,23,62,-4,-62,-122,-120,40,42,110,34,84,2,-3,-24,-75,-10,124,-38,-46,-14,-11,109,57,27,111,6,-99,27,126,72,41,-29,106,-24,96,96,60,-18,42,-104,82,53,-69,15,92,-79,127,-70,-102,-53,102,79,32,84,-119,115,-36,7,-84,-24,2,103,-77,54,60,1,-7,-64,-7,-22,114,-5,19,80,-49,107,-7,-2,89,-63,-26,-111,-51,17,-108,-40,9,-51,58,108,-55,-68,-117,99,-51,-117,-17,46,-33,69,13,-23,4,-71,-110,4,-95,119,103,-30,31,23,76,39,-36,6,-117,76,6,80,106,18,-124,-3,78,112,3,40,23,-55,-100,75,-118,-16,-52,18,69,-77,-91,126,-87,41,103,-127,7,105,106,77,-23,72,50,75,-16,-19,126,112,67,-4,-102,-56,53,38,-72,-60,-69,30,0,47,-95,100,53,-127,-16,-18,-16,29,46,73,90,-112,-97,-111,-15,-38,23,44,45,115,-93,-68,-32,-10,86,19,69,32,-104,-112,97,60,64,87,61,69,55,-92,-4,-77,-28,76,-82,56,123,52,-105,-38,-1,81,80,-40,-14,-78,115,32,-59,-123,-115,50,3,69,-14,5,-39,70,-124,34,61,-35,-57,34,127,-120,-13,109,-108,68,-22,-125,81,89,35,-21,88,87,107,-32,110,-27,-19,-82,-114,-81,99,115,-54,-92,90,65,-126,26,64,-114,36,70,-93,10,-94,-111,-90,118,-45,-3,-121,106,80,10,-101,-25,-12,-72,39,114,47,43,125,33,88,-109,-81,10,98,28,-98,105,96,123,-43,-58,-115,-122,-88,85,-80,26,91,-26,103,-88,-121,-66,101,87,-88,125,20,-58,-62,-46,-113,-100,-36,93,79,33,-108,49,-45,0,-19,70,103,-48,-19,-15,29,122,40,121,118,102,86,-83,111,-86,-26,-124,6,86,49,50,-67,-104,-28,-28,35,52,42,-25,-87,-6,-70,18,126,123,-128,-3,-109,-49,-94,-120,-62,62,-89,-107,94,110,109,10,-37,-126,99,-116,-85,113,100,-19,-52,65,-101,-45,93,-49,96,-78,84,28,-44,5,-110,-48,-26,62,127,49,-53,57,67,-85,127,60,120,-67,-96,107,34,-60,91,-6,-80,-8,-77,-119,50,89,-52,-64,96,-60,127,-76,-34,-1,-52,34,-25,100,99,-94,-46,12,-47,47,-47,-14,45,59,3,-74,-85,-49,103,-79,-6,-1,-25,0,-2,-44,-29,-11,6,108,-23,-48,91,56,75,-77,-71,-46,-100,-98,-100,90,-29,-56,-35,-3,54,-126,-62,124,1,-88,-26,4,101,95,-113,-67,75,39,104,-106,68,127,-127,-15,-36,-12,23,-51,-118,-22,-67,-39,-71,-77,52,104,9,-106,10,53,34,-98,-67,-74,84,95,87,38,-35,-103,-38,-125,-124,-31,41,3,-89,-41,-107,-9,-90,-39,-58,83,-106,-86,-24,-93,18,23,14,36,-56,-36,75,-123,10,7,109,13,-119,113,80,-68,45,35,57,32,-17,-1,28,-98,52,6,-37,-97,118,48,-119,-69,-102,37,-18,-4,-59,101,15,91,40,-31,3,5,-9,105,-9,-33,-31,-7,-71,-112,-71,-2,70,98,46,73,-99,42,-77,53,-38,48,-1,-120,76,-33,-62,-35,117,67,-117,33,58,2,-127,-100,-66,-117,-82,91,115,-111,33,24,-125,-89,76,84,15,27,-5,-87,49,-72,-35,-128,-49,114,65,82,-71,127,100,41,74,-63,52,0,-67,8,117,-102,5,123,87,-37,8,36,126,71,-108,-73,20,104,-76,-71,-50,18,-56,8,-62,-52,-105,-127,41,16,-26,-122,31,11,70,-100,-109,117,-35,88,29,-45,-78,115,-86,102,40,18,-58,-54,-84,32,-36,56,51,52,107,126,38,78,-66,-77,20,65,-119,-113,26,85,-92,-67,-35,-24,-47,-9,43,62,-70,-66,-41,-7,-72,-77,-79,56,75,49,67,65,43,102,-78,113,98,53,-47,20,-116,-4,-2,-12,-36,50,8,-118,-79,-120,-37,4,103,62,51,107,-90,79,49,-17,61,-15,36,17,-117,39,123,-87,61,11,96,-108,1,53,51,36,-19,-51,-69,-40,-91,127,-90,-62,126,79,-72,-61,123,41,-27,11,14,76,-67,-17,-70,-104,47,73,32,-120,-109,61,38,31,-1,-37,35,-21,-26,59,-53,-85,18,75,106,93,-83,-31,-18,-127,18,19,66,-74,10,-25,45,18,-109,30,4,13,-62,-47,13,-59,44,-96,19,-18,-113,65,-5,-75,91,-21,68,-90,46,25,-110,1,-115,-88,-91,55,13,86,24,-60,85,108,93,27,-61,-14,28,-110,-17,-18,68,70,113,-52,58,-9,52,111,-64,-97,64,-100,0,43,32,-88,13,-32,0,110,-104,92,108,66,-112,65,34,-64,-125,106,-9,113,-116,91,-35,-88,-91,-16,13,-117,3,37,121,-84,-75,-1,-44,-49,13,-77,81,46,113,-115,15,-37,21,-17,33,-19,-83,-95,27,28,83,53,22,-23,66,-25,-57,-15,-56,69,106,49,63,-120,125,106,-86,55,40,4,-96,-26,43,60,-107,-116,-76,-89,101,51,98,-21,106,-49,53,110,83,27,-119,36,2,-5,86,-50,47,-75,42,52,-59,63,-71,-67,60,83,6,65,124,16,28,14,63,-58,52,23,30,-81,49,-123,-26,42,-39,60,-27,-61,-66,-18,-88,-22,-46,-61,-60,65,66,-100,111,116,100,50,92,103,-83,111,-72,-5,116,111,72,39,101,54,-65,-44,8,-128,-88,113,18,-70,-78,-70,87,29,112,-31,63,9,12,-109,-27,-42,-52,55,-48,-70,95,-71,93,122,-46,53,-115,-22,-27,125,125,50,-58,-50,21,-71,9,-6,-82,45,50,51,-14,-74,-72,104,95,-86,57,65,-39,6,-10,21,-76,-52,127,-128,17,-36,-23,87,103,24,-95,95,10,95,21,61,-96,-24,-8,0,74,126,-14,-102,-44,107,-119,83,-123,51,27,-64,-17,124,24,-96,79,118,43,8,-95,-75,-106,-84,115,69,3,-118,122,-64,96,-29,-106,-78,-97,-82,122,51,14,-80,65,121,-66,-119,74,121,82,-120,77,96,-82,56,106,-45,-28,-116,78,-70,-13,90,41,-77,-55,-78,-49,91,-109,-36,-91,97,-31,95,27,-91,-116,-21,-17,87,112,-82,-51,62,-42,64,111,106,68,92,53,-68,-38,-55,-25,-38,-121,74,5,-96,-77,-14,-109,-87,75,-62,-108,12,-97,93,-91,42,24,-5,-45,79,126,-10,-71,-97,97,6,-19,-80,77,39,-111,-69,42,-123,-61,-30,-78,64,18,77,-99,82,-40,127,-39,46,66,46,-82,-70,-117,77,-17,27,96,10,56,16,83,22,114,114,24,-89,118,-84,116,19,-88,80,16,-25,66,111,-70,70,-86,-88,10,-1,80,-82,-95,95,-20,-121,-114,26,-15,-104,-77,-120,-7,97,123,68,69,-12,59,24,-20,100,46,75,-76,-23,-41,79,82,-3,-115,44,-69,-55,-100,95,81,-108,-125,-121,-46,-48,-112,-22,-10,-40,-60,112,22,79,89,-99,53,-54,48,-110,16,-51,77,94,59,-103,-50,-10,34,-115,60,84,31,-58,-55,-10,64,23,-5,112,96,85,75,4,-106,-77,55,-33,87,-76,-79,53,71,-8,-92,63,118,-60,-84,99,107,46,88,-89,24,-41,98,-36,-22,34,-88,-23,78,84,56,52,-14,60,123,-20,38,-56,-66,67,-80,117,-6,115,121,39,-126,-77,-8,89,22,29,-101,55,29,-31,-108,123,125,-46,6,103,-88,-35,25,-58,65,-118,40,-39,26,62,15,-25,77,-50,117,44,79,-79,64,-114,94,-31,-26,-67,-10,-114,-19,69,24,111,14,-33,-52,110,50,95,-107,63,-71,36,-21,-22,-7,-95,19,-71,-38,-88,124,47,120,98,22,-69,73,-5,-114,-18,106,-41,-102,-26,28,-41,-101,-105,-31,-120,-26,22,-21,-31,-44,-50,-127,88,85,111,33,-53,-114,-12,71,53,126,-55,82,93,-104,-77,41,-50,46,90,54,-28,-38,-128,-68,-80,-13,34,-63,31,60,-81,40,55,77,-5,-17,94,-110,30,96,26,61,43,-48,-128,101,13,-8,-6,-29,-60,115,-62,107,-57,54,96,13,114,-89,36,-69,-40,106,98,107,19,-28,-4,14,-97,-60,-71,-64,-107,-48,75,-50,-54,90,60,108,-101,-104,25,92,-60,-17,48,-63,103,113,59,24,51,32,-26,-101,121,71,-21,-83,-68,79,-115,42,5,89,-38,65,28,-91,22,4,89,7,-57,122,-51,-120,-58,-110,-42,-70,105,102,-112,33,-83,21,-14,62,-116,123,-55,-114,95,-110,-46,76,-12,-6,-88,-48,-126,49,-67,95,-94,42,76,84,-112,-64,-20,114,9,-8,-96,-38,-38,-85,72,55,7,127,117,54,-52,41,-89,-46,-95,-121,-97,-113,46,95,79,-105,96,36,62,111,-38,89,-97,61,24,120,90,-111,-69,43,48,88,25,-58,-89,55,26,14,121,-126,42,79,56,-43,-88,109,-53,31,69,-114,-1,-81,94,-50,35,20,-93,62,69,-96,120,-35,-103,-86,126,-44,-96,102,54,12,-97,-79,97,-49,-18,80,-68,-111,-17,39,87,102,6,-10,11,2,-89,-74,-104,-43,-9,53,-68,28,-126,-71,66,-26,34,102,32,-36,-96,-83,87,-127,83,-50,-60,-98,71,-81,108,-97,-74,50,20,-98,-9,75,8,-48,0,124,-27,74,-59,1,-121,118,52,-57,15,112,81,120,-10,-66,42,87,-92,-89,-123,-1,-29,-74,126,57,-50,31,115,-47,-20,-89,-107,51,49,28,110,38,-73,-37,-72,-70,-124,-20,-109,67,7,-114,64,32,-76,101,-107,52,-89,-109,51,-51,-3,-98,122,100,-57,-2,34,-38,22,-101,15,92,9,-104,47,-9,-18,47,27,-38,-58,-122,-20,102,-78,-63,-19,-71,-112,65,-48,49,27,85,-113,-57,108,24,81,-96,-47,99,-67,-121,-17,2,-29,-9,89,109,-45,-127,-59,122,44,-81,-39,55,5,40,0,-11,61,37,-82,18,-97,-69,-45,27,11,-70,-88,31,117,-98,115,114,75,-104,46,-3,104,-67,49,21,18,95,31,-8,11,55,-76,22,39,-17,10,24,-63,-97,57,114,-46,-62,-66,34,-86,-94,-67,-109,124,68,26,42,-65,-60,97,-41,59,118,-104,55,16,-25,-13,-99,-28,-50,-50,103,51,-77,91,55,53,-17,-108,-82,-121,-54,118,24,77,24,-120,73,-61,36,-122,-63,51,-88,22,104,76,14,63,118,122,-31,59,-115,-92,29,-66,101,-48,-7,-5,30,86,-41,-87,11,71,-15,75,-30,-110,2,9,91,18,101,-102,-51,-115,-83,14,37,-41,-17,106,-43,-108,-42,34,-86,65,57,12,-13,114,25,-36,-69,-48,93,-99,-89,-104,54,19,15,-101,-105,24,-51,-26,93,95,-2,-43,51,-14,-112,-83,69,77,122,20,-7,107,-29,79,115,115,-102,-58,-111,46,8,112,-67,-20,-97,-88,98,75,-30,-47,90,110,25,3,-8,94,70,47,22,-91,-103,-54,58,-38,-12,-50,51,37,72,27,7,-112,-50,31,-14,70,-76,-95,-109,-111,48,-75,118,-2,30,-7,-123,32,33,-89,-47,25,-6,67,73,-29,-7,-93,49,111,112,76,-65,8,-76,-95,45,83,-79,84,23,20,-96,-52,15,-70,-56,7,-58,106,85,122,-96,8,-84,85,-101,-30,35,-14,23,112,33,-86,20,-93,73,-30,-8,-79,-39,-77,-36,-38,-107,-112,-89,49,-27,103,48,31,127,-22,68,-35,100,99,57,-26,74,85,118,101,-43,105,-76,-93,-127,44,-1,39,68,12,93,-33,13,-78,11,-51,85,44,-99,12,-85,-63,98,-5,-92,76,25,-68,-86,-121,-67,-64,-109,31,64,-90,-58,126,52,-41,20,27,120,-86,-117,71,-128,-128,-28,-39,82,-102,113,59,30,-128,78,30,103,-11,-95,117,74,113,94,46,56,-96,41,48,-85,-25,-28,-79,104,3,-73,2,30,-22,76,-103,101,83,-89,34,2,127,-26,25,-82,8,18,-3,-20,13,52,-21,36,-38,90,112,-85,-92,-79,9,-72,98,15,-26,-32,-4,26,-26,-94,112,-5,69,-21,31,-84,-17,-112,-83,46,-24,-105,3,-102,15,-60,-123,99,-6,-47,22,-120,70,125,86,35,38,35,5,-100,89,96,64,-33,-55,29,-82,55,-3,17,89,52,104,126,62,-125,-80,113,34,53,77,83,-28,-65,-27,2,68,-114,-37,-4,-94,89,-41,51,-85,43,-36,93,-93,74,-8,109,-92,-70,114,-120,44,-63,77,102,50,36,88,16,19,99,-9,64,-57,-43,-81,-67,-70,-9,89,-64,114,53,-99,5,-31,87,74,66,-37,75,108,-100,85,-101,-44,-120,-32,-70,92,80,30,-16,112,-102,96,99,-6,123,-89,100,102,-38,-90,102,-80,-9,52,9,-47,-114,-81,-128,-112,2,87,-40,-41,46,-15,119,-107,79,105,15,-53,108,72,-22,36,45,82,-88,59,19,118,27,123,-93,-46,-44,93,-98,64,105,-80,99,-110,-8,-51,33,-58,76,-103,87,-13,26,76,-93,-13,83,127,-4,-52,-54,21,70,-93,20,-7,19,7,102,94,41,67,14,-52,17,54,23,-81,93,-61,76,-23,-92,-118,9,110,99,-53,-128,123,-127,-24,-125,-76,88,-79,63,-65,71,-79,59,-45,-64,-85,-111,-53,55,-102,22,-78,48,-67,25,100,0,30,72,19,56,-54,-6,40,-71,-42,98,127,-46,58,40,34,-6,-112,21,-113,2,-14,-42,-25,-78,-55,12,62,58,-127,-44,-40,85,29,-80,-27,-72,73,8,-36,-32,-21,34,-46,84,41,75,109,-41,123,-92,20,-123,106,72,47,41,-73,-12,-38,117,-89,44,-128,-102,-65,49,-43,69,-53,-119,60,-97,-39,9,-118,-33,-58,28,105,-41,70,111,39,-41,90,58,20,-25,-21,110,50,-114,-68,-104,-35,96,58,-16,98,26,-80,-98,63,74,119,-85,21,-124,8,118,-61,-125,-112,23,30,-77,92,-11,-28,-101,-57,-9,93,-49,103,32,-97,87,116,-96,77,-48,-27,92,57,-29,-25,52,-107,-77,-50,114,99,-79,24,-58,-19,-96,-113,47,-80,8,-83,-72,69,-6,55,92,39,17,76,21,-127,-5,-60,-115,-55,-28,40,-43,-43,106,112,-35,-57,25,80,19,-39,-6,-111,-79,4,-59,-77,121,-103,-89,-127,-113,28,61,-50,-125,58,-38,-33,43,124,41,69,-105,2,99,83,-31,-119,-21,38,90,92,-88,113,-83,56,-56,61,-49,-74,-2,-23,101,-114,26,114,-95,-52,-73,-7,-53,116,32,49,119,81,-88,-49,-102,-126,50,-47,38,-13,76,69,-73,-124,5,-53,-63,11,-42,35,-97,46,29,-43,112,-2,46,58,83,-17,41,-5,125,-34,-96,67,49,-17,-80,38,-82,81,29,84,-13,96,-112,49,13,65,117,52,23,3,49,-26,-43,-88,-97,93,-60,-93,-34,-54,-74,5,-113,64,-73,23,-95,50,17,-112,123,-90,4,-35,103,16,-41,26,-104,109,-119,-71,95,28,60,-71,-41,-26,5,-118,-31,-126,58,-93,-50,-48,30,-51,-31,-2,-92,-75,85,-52,71,112,-48,74,-65,-24,41,104,121,-95,122,-83,-49,119,-20,38,97,23,-73,-22,55,-118,45,25,-37,47,-122,89,-4,125,-105,37,55,102,52,-12,34,7,85,15,-6,17,13,18,97,20,-92,79,107,-16,117,-80,60,-3,-23,81,-70,124,52,-36,105,-44,-125,-40,-81,28,88,-57,-111,-96,-49,18,-5,71,-37,32,-73,53,1,-124,77,-70,-107,33,-79,-83,-34,-125,43,20,-55,15,-53,59,59,-97,71,44,78,80,33,-20,65,68,-72,-125,23,-30,-3,-89,93,64,88,123,-44,126,117,59,38,-5,32,40,125,124,98,-104,-31,-59,-27,98,12,125,-43,-48,-74,43,62,-6,73,-3,19,100,-104,-62,35,47,-8,37,60,-125,-100,95,49,-74,-15,8,76,58,14,-85,20,-56,29,70,-125,94,-60,-56,-112,82,73,92,78,-40,-37,37,-50,22,19,63,23,-49,116,27,113,82,-5,24,46,85,41,106,-11,102,-123,60,45,-108,63,124,-67,114,53,-14,-126,-108,64,-6,-27,-19,-101,-27,102,112,-45,93,-4,-36,-68,-111,93,-64,69,-128,-109,-78,-16,-62,-79,-51,-8,-39,-40,-94,-4,123,-117,70,87,-91,-79,15,18,98,11,-51,-104,-76,-59,40,-82,110,100,102,13,71,42,117,-81,-41,-120,-48,-17,-20,44,-44,-120,76,79,123,-128,111,-51,71,-41,-76,-86,-32,80,-43,124,-65,123,21,5,5,55,34,73,-46,-55,58,-108,116,110,85,59,-61,-24,-86,111,-34,-128,-111,59,45,-125,-94,-47,-90,48,-109,-56,-95,-37,-127,79,-17,102,-52,-96,16,-77,31,40,-59,-93,-26,10,-28,108,-2,-85,95,-25,-88,-94,120,30,-24,-69,-9,90,81,67,-92,123,116,42,12,123,88,86,-86,10,-16,-77,54,-119,-54,-43,-7,104,-111,-75,-3,63,-96,-95,112,-68,80,68,-128,3,-13,-37,74,-113,62,-88,-32,-40,-48,55,-21,-64,64,118,-126,-41,-79,-75,-112,-78,-81,19,20,-10,86,97,-20,127,101,56,118,69,-62,73,52,125,-15,-84,-30,65,105,-53,-59,-54,87,-87,87,-116,49,-120,71,-48,-108,99,-19,-107,-98,-40,58,86,-119,-125,-62,-38,23,91,85,-55,52,-31,123,-76,120,77,49,122,-118,-19,-56,86,-74,-15,-82,47,-121,-83,21,-69,119,-86,-39,59,-84,87,1,19,-58,-67,-122,-45,54,-38,-96,-13,100,-91,-118,-97,-72,73,-30,23,-121,-30,-36,94,-38,20,22,-4,-85,-7,50,114,-105,95,35,-85,-41,-89,93,8,-53,45,87,93,117,30,17,-61,69,-61,48,-52,-75,-99,-104,-113,-27,10,80,89,119,107,-76,-30,75,125,122,55,-13,8,-37,-37,13,24,33,31,98,-14,101,-51,24,27,37,-51,110,-15,83,-49,-122,85,-30,18,-17,92,101,12,97,-54,-99,4,73,-82,-46,111,29,-7,-75,90,106,-91,45,68,-111,68,-63,99,86,-74,-122,-35,21,-28,-22,74,-80,-70,-93,50,-9,14,-84,45,-18,-41,-50,-105,-94,82,-89,102,74,-38,120,90,43,-17,-82,-83,-119,-17,-106,52,-80,-63,123,124,75,-118,98,0,-100,-76,77,-72,-18,80,-49,61,100,107,89,-27,93,-70,-52,-68,-89,-46,49,-9,-77,13,-29,103,-52,-69,-88,-65,-33,39,-119,-105,29,96,48,86,-76,55,62,-128,109,5,73,-94,-11,-43,-82,-32,52,122,33,29,63,-40,-89,-88,77,-16,67,-69,-106,-59,112,59,6,-67,-92,-115,107,-120,40,38,69,-33,87,81,9,8,9,-31,-110,-68,113,-117,44,-81,-62,-85,-23,77,-6,84,-63,-126,58,105,-48,75,38,80,-2,-45,34,-62,107,-8,-16,-82,-17,-128,57,-113,12,-99,-110,-47,100,-44,-23,121,42,-29,34,-64,100,-124,123,105,-7,-128,117,5,13,-13,-125,112,86,-4,53,-128,-81,-87,-75,-18,116,-77,-110,-122,100,-60,-124,117,82,-35,77,87,29,125,-127,123,-54,100,-117,-100,-49,-105,-77,2,-110,-4,-101,6,53,63,-103,76,-118,-40,108,-103,52,122,-3,54,57,-86,65,86,4,-106,-99,82,68,-44,15,-41,17,51,4,92,22,-63,-83,-126,63,65,-115,76,-109,80,-50,16,79,105,-115,96,-71,34,-61,-89,92,98,-36,-88,56,113,18,-123,120,32,110,81,108,-29,-31,34,-102,-24,-33,-8,76,25,-128,77,90,84,76,-98,-104,-4,-105,-65,-62,10,29,-80,-116,89,120,101,-36,22,-85,77,-44,3,-107,63,-19,45,-126,16,1,-29,31,-125,113,-108,30,-103,-127,-38,26,-18,-120,-56,-121,32,-25,102,-7,-85,-50,47,-121,-109,-127,-6,-34,55,-34,-114,82,-6,83,-44,-2,-69,101,-34,-21,123,33,25,-23,-108,-46,-107,-46,56,38,-30,108,106,-31,60,-78,8,4,25,124,12,37,29,2,89,40,100,-48,21,-53,-87,109,-116,77,-46,-60,-64,122,-68,-25,-109,28,-71,62,121,-73,-84,80,12,-88,-118,-89,109,-74,106,-62,89,-65,58,-73,-74,-110,-64,-73,-27,-87,96,-128,-122,54,-72,42,22,-37,73,-87,6,31,29,-46,62,23,-99,63,114,-20,10,-43,68,15,-24,124,-63,-25,76,-12,30,-43,-86,38,111,69,-121,-5,-49,-42,34,-51,119,80,39,86,-32,-74,27,-71,-24,-25,73,74,-11,104,53,117,87,-11,-32,-115,-24,-78,99,-7,-113,-76,-99,112,-20,50,121,-9,-103,111,-10,-68,-9,96,-35,-108,10,2,-38,-18,-73,90,-64,-105,94,-22,103,22,116,-68,99,-42,124,-117,-122,-119,-43,47,-6,72,90,52,-52,-76,2,-84,-22,-19,-85,92,-124,13,-115,2,36,107,15,-76,127,47,-39,3,-109,90,-24,-74,1,-29,-17,-21,-27,32,102,-57,26,-108,-114,-104,-112,76,-47,86,-17,-86,38,114,106,-81,-77,67,52,-28,-68,23,-63,-57,-110,95,-81,-35,-97,-96,-29,-11,64,-118,-1,-99,-25,68,-24,-118,-84,-113,68,94,-39,93,77,-80,-1,-123,12,97,80,-117,111,-52,5,5,-24,-98,-27,-96,48,-37,-108,-28,70,63,-21,23,123,67,-33,47,-96,-58,-50,-109,-124,-64,20,-37,44,-101,34,100,95,94,-57,-4,39,-21,-62,-37,-76,-72,-51,114,10,-21,113,-68,45,27,-77,105,47,18,122,43,-117,-99,-82,-15,40,-7,112,-86,27,-37,83,-53,-8,1,-110,64,47,-58,44,14,-50,18,-33,-17,69,-90,51,-58,35,-103,29,38,100,107,-44,106,-99,-49,-90,107,23,-44,-79,-21,7,-10,40,-58,-76,-50,-106,-47,84,34,91,23,-9,113,114,-91,-11,-62,64,58,20,44,-76,-55,-105,38,-101,94,121,-125,81,-128,-55,-101,-22,78,100,43,94,118,-46,-103,-36,48,81,45,90,2,-3,44,-8,-49,-66,104,116,-69,-90,-78,28,15,-65,-31,103,14,-71,-103,-90,36,-54,-81,-62,-35,70,-60,103,45,-13,20,-32,127,-93,59,127,-89,-54,-23,117,77,48,3,-84,-56,-35,37,87,-115,60,11,-27,103,44,78,-16,-3,-112,-44,45,-112,61,-102,-104,-67,88,102,121,104,-106,46,-39,-91,52,-77,-13,118,-79,-52,61,-5,-90,46,24,-84,-59,57,-34,-62,101,47,-66,122,-18,28,102,-123,32,-19,121,12,81,-110,89,-38,-78,8,-78,-2,-94,44,111,-2,-36,-66,22,-59,83,-43,92,-29,60,-71,92,7,-51,19,-2,-66,39,-100,116,92,-78,7,124,107,103,127,-115,62,80,99,98,-74,-95,109,-3,-126,59,-61,-93,-58,11,87,-24,113,100,21,-65,-103,-71,-106,122,-71,96,100,-38,-23,-118,72,0,-68,-55,-108,88,82,73,119,-105,59,-90,-41,99,76,37,-41,-62,18,94,-37,67,56,68,-41,110,-24,53,14,-62,-121,38,-84,13,48,48,116,-17,-80,110,-63,50,8,-4,111,-77,-4,77,112,19,64,-9,-32,-45,77,72,-90,-127,74,88,-61,-85,-75,63,125,-46,-86,-15,79,116,7,76,46,-99,14,36,-55,0,76,95,101,-115,-18,67,-35,71,-104,95,8,-124,-42,38,13,-70,98,18,77,51,-27,-82,-61,-66,26,2,2,-26,-119,-61,-70,44,27,114,99,-99,97,14,34,63,-44,-88,65,82,-47,30,-99,-97,-13,13,48,47,117,4,-29,37,-7,11,28,78,-59,41,-94,8,-125,99,32,-109,-13,14,-58,11,100,101,-94,-61,-49,45,90,47,77,84,19,12,-86,-24,-63,112,73,-48,4,-91,47,54,3,67,68,5,-26,-64,-71,110,113,-96,23,105,-14,-79,67,-18,36,-35,48,-36,68,-33,56,-5,39,-56,-11,-20,-43,6,-33,82,121,29,-78,8,28,-29,-76,-101,-81,116,-72,-98,97,-16,107,123,-89,-47,102,-84,-113,-107,-24,105,-112,-67,-41,-77,-18,29,-19,49,54,49,20,41,63,84,103,15,33,50,-118,-25,42,87,48,61,-48,-121,-74,16,-85,-13,-14,6,-76,82,-68,90,-4,-40,17,2,-101,81,102,-80,-2,-64,-74,-54,8,7,99,-117,21,21,74,-50,-36,-89,85,-75,-35,-29,2,-105,-55,2,71,28,-118,53,-84,126,2,9,-104,-20,45,4,-113,76,10,124,81,83,88,50,66,95,44,-110,17,122,30,92,26,-85,-53,73,-32,-78,-127,5,34,3,-75,81,-15,54,-13,9,-126,-42,-102,7,119,96,34,109,67,6,-70,116,-26,9,103,19,116,-9,88,-12,39,-88,92,85,-87,91,33,-43,96,120,-59,-53,12,84,-18,-68,3,-87,48,-99,87,-28,21,-88,-93,86,116,63,100,33,-65,-56,-36,-36,-38,-80,-62,-97,-87,66,77,-65,103,85,-99,73,103,102,-80,104,-70,60,-6,-96,-67,1,-44,-1,90,-80,-59,93,39,-81,63,66,-35,17,-56,-58,-49,83,-80,71,-54,-111,-7,92,-48,29,56,-7,-107,-114,21,-75,54,-124,-60,-3,-78,-13,-110,61,123,80,96,-49,-105,-115,112,-29,-68,126,-74,-87,82,70,-70,16,-84,53,-16,22,29,-40,-47,-90,14,-117,6,-3,-13,64,87,-84,-100,52,-57,23,108,74,59,-37,82,45,20,87,-65,52,-96,57,-61,2,-33,-39,78,-79,-61,84,63,34,27,37,-13,12,32,101,9,-16,21,-19,59,-119,57,-97,-124,127,76,6,83,80,27,-31,102,-105,56,118,85,89,16,98,-57,68,6,3,58,-95,-78,-77,26,-26,-21,5,-113,23,90,-110,-16,35,-108,-23,-47,-14,-42,102,119,46,10,58,83,-117,-49,80,-38,-58,80,25,-85,40,-2,-54,-35,-100,-77,-80,87,-122,-94,-45,-115,63,-10,86,84,-47,101,-114,123,111,71,-75,-111,-47,43,-35,-99,-22,-3,106,-89,-94,22,111,-52,95,104,-17,71,96,7,10,-99,-90,-38,32,-81,-7,30,-112,-16,-11,-104,106,-30,78,-110,99,30,-31,111,-125,-50,-19,-66,-50,109,-113,26,95,-74,-86,4,-66,70,-4,-2,-14,-86,-83,118,48,-62,-30,-2,-78,102,-105,83,-45,37,58,100,53,-66,46,-104,-25,125,-112,49,89,95,75,88,22,19,-76,101,-35,39,20,-82,54,61,-40,-106,-83,32,-106,-80,116,-52,-45,-126,-86,-56,-71,52,108,70,39,-24,103,71,121,117,120,9,5,-97,110,-79,-39,77,-56,71,-90,-97,3,-8,-64,-5,-102,105,59,-76,-100,-65,-99,-7,-6,85,115,14,112,118,65,-60,10,116,68,-83,69,-118,23,13,24,40,68,-2,-78,-43,79,-63,96,-5,-19,19,-56,94,-79,96,-7,19,-93,31,-47,30,22,89,43,-104,61,29,-49,-111,61,-41,121,32,116,121,-17,-109,-51,51,7,-6,-80,-84,-105,-41,88,-61,16,91,115,69,-25,-80,-12,45,-70,80,75,-22,-38,111,15,-71,39,62,68,-51,40,11,-9,51,44,29,-27,-106,112,-95,29,-105,-114,68,105,-109,-68,-13,-82,33,51,50,-48,-65,-103,-46,13,-29,-51,17,54,123,-91,108,-73,43,-120,27,100,-13,32,52,123,33,-52,-43,-110,-79,-76,-30,-86,-90,109,49,103,-28,39,-52,41,106,0,-13,10,124,-57,-15,10,-124,74,26,91,114,-63,-48,52,11,83,-44,95,13,-23,-57,114,82,-108,96,39,-34,27,29,-60,30,99,5,-101,-128,117,-74,-47,-118,-33,-69,-121,-18,-112,20,-6,117,-35,-80,-35,-102,109,24,-33,-5,47,-13,101,-127,4,25,1,-57,-117,-65,74,-107,-64,125,0,-60,-78,110,-100,-19,-1,-63,27,-17,61,-75,-84,-56,-29,-25,21,46,107,88,-33,109,-89,83,-83,-121,-100,-55,-48,29,-3,28,98,-59,-64,-73,-65,-86,-63,30,92,4,-29,65,-26,-111,47,1,-21,-109,26,-86,-119,113,-1,-29,-88,75,77,-54,-35,-95,22,24,-40,80,127,-56,-24,125,43,-18,97,-32,-77,61,-85,-105,69,19,9,127,65,10,9,-76,90,-37,-2,-15,-18,-57,2,11,27,-51,109,17,28,2,90,22,69,98,-55,-53,-63,125,48,44,-13,-96,-94,65,-116,88,-2,76,72,61,79,64,12,-112,-11,72,44,-103,-29,-24,106,78,91,-93,72,74,-123,-121,-36,4,79,-28,92,83,-109,-99,-98,63,92,-39,98,94,-43,10,-57,83,-23,50,92,79,-111,-79,-32,40,-34,91,-26,115,-124,68,-19,-72,56,-101,60,-73,-55,-83,36,-59,-86,3,-73,-98,-85,103,3,10,-113,53,34,-90,112,-122,-114,26,46,52,58,51,-101,29,-1,-87,-108,25,-77,-51,0,97,32,-36,57,117,67,-124,-61,-67,13,8,-108,-59,-50,28,95,10,-112,124,105,-127,-54,-43,-86,53,-50,-1,-108,65,-111,35,-42,-119,-28,-47,-92,15,-97,-50,12,-42,63,10,-71,-23,22,83,-24,20,-28,69,114,108,98,29,3,123,-42,-101,120,-36,13,-44,87,74,15,-89,77,-23,56,65,-12,19,54,66,-31,-111,-16,109,-43,-87,111,69,79,124,-8,-17,-46,15,-48,61,-28,-72,108,-58,-55,83,53,-80,118,-88,43,-54,74,-38,-102,56,116,-125,-80,-75,-3,43,105,88,-66,-120,117,-58,82,-5,74,6,78,-79,-72,-51,85,-100,-49,123,-42,90,4,-33,-55,127,88,60,-115,-123,20,123,117,-75,9,122,-19,-98,-97,-15,90,92,-32,94,-86,68,41,93,106,-41,-60,-80,40,-91,24,-86,-39,-120,73,-27,125,65,-87,-123,-41,35,-9,113,91,-111,-40,2,5,83,34,-66,114,90,-111,57,126,62,-93,-117,5,-68,60,11,-105,-33,-35,51,-52,97,-45,83,117,-81,36,45,59,64,-43,-62,69,110,-95,88,102,107,-125,-97,43,-122,95,4,1,25,-51,-12,43,100,-22,98,-64,64,94,-74,45,-46,-38,102,-21,29,-37,-123,-104,-2,119,-40,115,15,-31,2,21,75,-115,82,-8,74,18,8,27,90,-80,88,10,-104,37,-1,-82,80,77,-97,-99,35,-105,40,110,24,-49,99,-94,20,43,40,-40,113,10,-71,43,-22,-63,77,64,-79,-3,-82,-44,23,-53,86,110,97,-124,-27,-106,104,-95,-96,-121,-14,25,74,54,72,120,107,-128,-60,-9,21,49,-12,-67,18,-30,-91,-33,77,40,33,38,-70,7,-89,-43,44,-12,-108,111,14,36,85,-15,112,-85,-48,-109,98,57,-17,100,85,-123,-111,-72,60,15,11,-124,90,-105,-107,7,-121,91,-98,-10,83,-116,54,-10,-128,64,38,59,64,-25,-17,36,101,-96,67,-108,-89,46,26,20,126,-71,0,-1,77,32,-31,-72,-29,44,-8,-14,-74,42,-21,-11,95,119,123,84,-128,30,20,27,-74,38,-122,-11,41,94,-33,-51,-115,45,7,74,80,35,-30,18,-101,-6,-92,95,-69,33,15,16,-59,-111,-67,3,-86,28,40,-43,68,27,-95,-111,-26,98,83,38,106,-126,86,-34,-54,-102,-88,-110,38,40,46,-37,81,11,-8,-122,-46,30,90,112,-40,95,-73,-61,77,-123,105,-44,32,-109,81,-110,-23,127,81,-83,-55,77,-44,62,-33,-70,4,-62,52,115,-36,32,-96,-123,86,-33,127,86,43,38,53,21,-125,106,-69,-16,-98,84,-80,-12,-25,17,-70,-72,-33,34,-115,-119,42,48,-34,6,-18,91,-19,22,46,0,-92,-27,-116,106,35,78,50,44,-110,-113,14,7,18,-123,-112,22,113,-91,-17,-51,88,-83,-19,-51,30,28,-64,109,-114,86,-33,73,30,-1,-58,-121,51,-109,104,86,89,119,-76,-28,-90,-95,69,-100,-55,-23,58,-14,-112,30,125,-77,72,-99,39,55,67,54,4,-6,52,50,-47,92,-26,6,3,76,96,89,126,97,80,-80,-76,-100,67,-119,58,-36,-13,16,53,53,5,123,31,106,33,-67,-27,111,48,7,23,-111,-110,-42,-105,-16,38,43,-17,51,-12,-98,-32,89,3,64,65,118,21,-66,-93,-1,-115,93,7,-75,-25,126,107,59,-19,-26,-107,14,75,45,-110,-16,-34,50,-11,2,-109,19,125,-61,-94,-63,-24,123,-11,54,121,-115,-16,-39,2,98,77,102,52,90,-110,-55,-119,109,-47,-121,119,116,65,68,6,6,22,103,49,-121,-117,119,-90,-38,124,-32,90,104,109,-16,-92,-100,61,-115,60,-107,-26,93,111,27,-124,54,-77,-72,123,-79,-89,89,-54,-94,59,108,-49,78,-4,-108,-28,-119,42,55,36,95,-7,123,-99,-42,-6,-100,91,-65,32,-24,-77,106,-5,59,-93,-100,35,115,70,-90,-6,-7,40,-20,76,105,-32,-74,-32,77,-91,114,-126,49,-83,-81,113,84,80,-69,-13,-99,-29,-103,-69,102,-108,-127,-43,87,-11,-126,119,-113,-104,-11,62,79,26,-90,7,-22,-64,-107,77,77,-83,24,52,-90,-57,10,114,-22,-38,115,-52,-37,-63,-76,94,-13,-56,-96,59,78,33,85,-97,-82,10,74,-113,-95,-78,99,50,-66,4,32,69,102,20,-76,-57,-69,-26,5,127,-105,94,-72,-117,-19,-7,-38,-91,24,59,86,9,91,-58,126,-126,-81,-39,28,124,35,101,74,-90,120,54,14,-108,-31,80,94,50,-40,-56,26,19,-5,-37,-39,-117,-45,9,37,83,53,-73,-22,-102,-107,-104,38,-125,-126,90,-106,-98,74,72,21,-56,-76,20,109,52,29,-45,-42,51,-51,-1,122,12,91,-18,-69,-3,55,51,-111,123,-106,11,-108,51,-93,96,-100,-87,91,-51,70,15,-39,-81,35,-54,62,-87,33,-125,-64,-111,14,-89,-109,70,-36,-122,65,-47,126,-119,126,-49,-34,126,46,-87,88,-107,-117,119,29,25,-65,-89,62,-88,-89,-117,103,9,100,-36,56,95,79,-124,66,-126,-5,-9,9,-95,-95,-93,54,-54,-2,81,-106,-25,21,108,105,-9,-37,-97,69,84,122,39,-124,59,98,-25,-67,35,18,48,-105,78,117,-75,-42,-76,3,-107,76,3,79,-81,-61,-99,30,-99,101,-94,-118,112,-88,-82,-19,103,-67,-71,76,-105,-24,-20,-91,83,90,-7,120,34,-26,75,-110,41,62,-77,-116,23,109,74,107,-78,94,26,-125,-13,27,99,49,77,-73,87,100,77,0,93,88,-23,-115,-108,-36,-24,123,-60,-65,-63,-44,19,0,102,-19,69,89,85,-96,-103,88,123,108,-68,119,-99,89,-56,11,116,-106,-68,97,6,-60,52,47,-1,-53,-55,94,-107,-3,-105,-9,-3,-21,-37,-69,18,-59,37,78,127,118,-117,107,-79,-43,124,-108,33,-121,52,-25,-71,76,-2,64,27,-52,88,68,14,25,57,-115,30,-36,63,-16,-75,92,-57,110,-105,-82,-72,-21,30,113,-20,-92,-15,-77,-25,-20,106,22,79,56,21,68,115,98,71,32,122,20,-70,112,62,38,105,48,115,15,47,-124,-71,48,-41,-85,-6,127,9,122,-68,110,-45,-35,-103,-21,122,30,42,-70,68,9,13,83,105,110,98,8,-42,93,-26,117,21,-42,27,-82,110,-123,-98,10,-5,22,-112,29,-32,109,7,31,-91,22,-56,71,60,29,4,-126,63,-64,74,-77,-53,92,-54,-7,-128,72,-92,-20,6,-89,52,-20,46,32,-119,-94,-90,-92,74,106,22,-50,-69,88,107,8,55,3,-102,-64,-106,28,74,13,97,96,110,-59,83,58,-95,-49,87,-106,71,9,125,-19,26,-26,-28,-93,-52,20,49,-63,-73,-11,14,112,121,-65,-128,88,4,72,-29,-117,-74,-33,102,21,125,112,-82,-49,-7,-28,46,82,-71,12,4,118,121,97,28,16,85,50,-24,78,76,74,-47,107,-67,63,-112,-94,93,-59,-32,-48,119,84,74,108,52,-113,-96,-17,27,122,23,-67,-10,33,-54,-63,49,57,-58,-103,54,20,-18,102,-78,-125,20,62,109,7,107,-20,31,-85,104,5,81,-61,51,98,125,-32,125,-90,-100,6,104,64,56,126,-86,24,109,23,15,-100,23,50,-83,22,30,-128,123,-82,-89,14,-82,-48,-36,-92,-12,-65,10,107,-124,-61,-36,-75,0,49,-105,26,101,119,120,-37,-89,-38,18,-55,-118,-47,-92,-17,-14,48,-50,-72,-100,112,-125,-106,126,-114,-23,-105,102,-41,-7,-5,-25,87,71,-111,-76,-11,-106,57,39,-84,-28,123,47,50,-23,-66,102,-101,-65,103,10,32,84,82,32,34,-112,-14,-109,-125,79,28,97,-18,38,56,-70,-36,-6,-78,33,-80,-120,104,27,68,41,93,125,-95,90,-18,-33,-97,-102,53,4,-79,-27,30,41,-51,-72,-74,-102,92,28,-56,122,114,-105,121,-51,8,63,-117,-56,126,-127,-126,84,49,30,-76,-45,-13,53,57,34,3,-85,49,41,-112,-71,127,22,-111,-114,-34,-45,38,44,97,4,52,-111,-35,-98,-24,-53,42,-118,74,-86,-19,-52,-119,-88,22,119,-89,71,112,26,-21,52,35,65,126,117,-110,47,4,-66,21,-8,-51,-72,-120,72,-107,85,3,72,73,-27,-36,19,-114,71,-89,-111,-100,116,-97,-53,87,-68,-121,-29,17,-60,-28,-64,116,11,45,-125,-83,-55,71,4,-3,-123,53,-122,42,-45,104,101,-22,81,-24,49,-37,91,-2,44,-77,-72,-64,-80,-100,-75,-26,-102,108,19,-107,-23,-51,-11,-4,-18,118,-18,125,-84,90,41,8,30,-54,21,-91,-115,102,-99,-35,6,-35,24,102,26,-108,-8,39,-93,1,76,124,-9,28,114,-39,44,9,72,-72,67,-24,-41,-3,-92,-58,-31,-57,29,127,36,16,-87,-1,-124,-34,57,-23,118,-38,51,-19,121,15,-2,-44,8,-87,-82,-47,71,-14,16,-41,48,79,17,118,-83,-84,5,-62,-127,-20,28,-12,54,-95,115,-89,124,-18,-118,40,-125,-97,15,3,89,-21,-19,45,23,-58,39,-1,19,-18,127,-121,-46,2,-24,38,-64,-48,19,81,-16,80,-37,-128,123,-43,36,-73,-127,55,-62,121,14,93,42,56,-117,-43,24,-99,-79,-46,-34,-112,-99,38,11,-19,23,-70,-121,-128,-81,-110,-76,88,-53,-51,-128,51,52,54,-58,-80,-35,83,20,10,27,-109,112,119,38,-19,120,97,67,24,-65,51,84,37,-8,112,67,6,-127,-104,-50,118,58,-1,-97,-94,78,-103,10,30,-95,-94,-42,107,-67,-41,-39,63,-108,27,91,21,-23,-88,-118,-55,-1,-28,-9,16,-29,-37,-55,-80,78,-82,-112,62,48,46,-41,1,34,50,12,-53,46,123,1,37,71,108,3,41,-123,-94,-50,-16,8,-42,86,-39,51,-24,119,20,-55,22,115,-82,114,-86,-110,8,-15,-72,74,83,14,93,59,122,107,3,-17,93,41,51,-56,-125,-21,28,38,-59,69,71,-48,111,38,79,-29,-23,-17,0,-110,75,87,113,32,50,-113,4,-4,12,-20,-27,-61,-41,-117,-56,-99,-77,115,-87,-99,40,-95,-99,-31,26,-102,119,-53,2,4,29,-21,-86,94,112,-82,45,23,-65,-23,-85,-97,-17,100,75,-110,116,1,-109,29,-111,80,-90,74,93,3,95,-48,112,-106,-18,77,25,-29,-22,-117,72,94,9,113,95,-1,-104,-28,-124,12,97,66,-109,33,-94,91,-29,-88,-102,-76,77,21,-65,51,95,54,-16,78,-116,78,-79,-51,-107,-123,2,49,40,-124,-90,97,64,-3,-105,71,14,-114,112,3,124,-83,-105,94,-50,35,59,73,-63,120,-43,116,16,-91,-46,-117,-18,-108,-26,-84,84,75,123,-21,-97,-118,-119,34,72,-59,-108,-65,-104,21,70,-108,63,-35,-26,-63,-11,-55,53,-125,-81,-58,-115,-54,-16,59,7,-12,0,-67,126,81,-72,-118,-76,121,-13,5,27,80,-23,87,-125,-85,-14,-37,-6,-56,-79,-118,-19,-43,-45,72,71,-91,-49,31,-121,34,-90,89,-22,46,116,-62,-59,-4,49,12,23,-39,40,88,-54,12,120,34,26,42,-7,-18,-89,67,-37,123,61,74,-91,-36,-38,15,-104,113,46,0,54,28,100,-44,-75,25,-56,28,103,44,-92,34,-100,-113,28,-75,-16,-121,-7,38,58,-99,66,-20,-2,-122,-19,110,11,-58,45,-72,17,38,-45,6,41,64,-86,36,44,91,-45,17,-93,43,-73,-41,-70,52,121,-71,53,-90,14,115,110,29,36,-46,-75,92,97,102,-53,-88,-32,53,122,-39,20,55,-102,-101,117,82,-26,14,46,-120,-91,85,36,101,-108,-81,-26,-18,115,-50,-47,7,18,-125,-24,-46,33,-24,-108,-71,33,41,99,47,-66,-43,-25,117,10,53,-2,10,-14,126,-112,104,-74,-77,-57,24,-30,81,93,115,69,89,10,90,34,88,-116,-90,65,72,43,123,51,-85,55,8,-12,13,10,-90,-37,123,-4,109,40,105,112,99,64,-74,-83,104,44,-20,-16,54,25,-82,-54,64,-109,-37,-3,107,-17,124,14,60,-64,-47,-72,-84,40,-74,89,6,36,-98,-125,30,63,14,-70,109,-62,-38,112,127,-41,52,115,27,-56,-112,76,-107,-65,-118,26,-74,-53,-96,114,-120,78,24,77,48,60,29,49,-117,-15,-91,1,-26,58,-84,-9,-109,-115,-89,-21,82,104,36,116,-103,121,93,-50,-39,-103,37,52,-108,-28,49,-87,-115,-93,38,-37,-68,-28,14,-26,-41,19,107,-2,-107,-37,-49,11,17,-120,24,24,-110,-100,93,46,-84,-122,38,6,-53,-7,98,102,65,35,-8,-6,44,-99,86,-5,67,-4,-65,13,66,23,-111,24,19,7,9,-92,29,114,58,-43,-105,-61,-33,34,-57,-26,5,-11,77,48,0,-41,-49,22,-20,-44,-30,-99,10,45,47,-51,-29,20,-11,-61,104,99,-15,21,-67,44,-71,108,-83,-11,-104,57,39,-84,2,122,14,127,-110,5,-79,98,95,23,89,3,68,-87,94,-9,40,104,107,24,-97,26,-36,-111,-95,-100,31,-97,49,77,-69,112,-96,-111,-45,89,-9,127,114,85,-102,-5,16,-1,-53,31,-69,-53,113,-6,84,-6,-18,62,-44,-73,68,-15,-105,-36,127,12,-27,-28,-31,-42,51,-121,86,-19,-111,-86,-119,93,-74,67,32,51,73,35,-106,18,70,44,72,-82,50,-19,-45,98,-60,-84,-67,-84,-126,-5,38,-67,-2,-62,-54,-23,-110,113,-14,-89,52,28,-61,11,4,70,-100,-35,0,-46,-124,-11,49,118,39,-80,-70,-100,-120,-54,-69,102,59,39,16,-49,53,-50,-27,44,90,-115,69,-102,-113,65,20,-47,59,-115,127,-19,-54,-19,-27,-28,-94,39,65,-114,-115,75,-46,-85,75,-4,-67,127,27,-98,-42,1,-124,-43,22,-21,-27,-74,53,-45,-90,127,-83,-44,-86,-23,10,36,86,59,99,-126,108,-59,-99,-45,-16,91,-33,110,-120,106,-87,19,122,115,-86,85,67,-83,-4,-57,-111,4,-5,-58,-91,-2,95,11,-53,107,-68,-128,-68,-12,85,19,-36,-40,-56,10,-64,58,-12,-32,79,20,37,-65,-33,-9,88,123,114,94,31,67,-32,-2,86,-124,-116,-62,-100,41,-17,35,-81,67,-110,-85,83,45,-121,5,-120,-3,47,14,-65,-78,-114,-87,-9,-19,-21,-7,106,74,117,-40,78,-33,63,61,-70,26,56,-9,76,-121,14,-77,87,-125,69,-32,-101,50,30,104,-59,-117,43,80,-98,-11,-94,-23,-108,52,-38,97,24,-10,-41,125,-119,-19,-42,-56,25,65,7,-39,-102,-4,110,109,74,18,13,-126,96,95,-89,99,15,-3,106,6,72,35,82,-78,-15,73,116,61,-127,-83,54,98,-17,2,-7,88,-57,-37,-39,-102,-79,31,-6,111,-62,-24,103,69,74,113,-15,65,68,37,-65,123,94,117,-121,-32,-78,-5,120,59,104,60,68,5,-65,4,64,-85,-80,117,-101,61,46,-88,69,-123,-19,-57,-15,97,125,54,-23,84,-124,-27,114,-47,16,104,-100,44,-87,36,-27,81,-20,-73,-80,95,-64,-34,29,-77,66,-126,77,-120,105,-100,79,44,116,-18,-15,-27,-71,19,12,-80,-18,27,45,-92,116,-27,-14,14,-77,1,-40,-110,-26,-4,-120,-88,60,51,108,-101,-123,116,-83,111,1,-74,-69,87,11,124,2,93,-64,121,-45,62,-79,110,-37,-55,97,27,110,-79,-91,67,99,53,26,-74,43,98,9,-43,-103,80,-23,60,68,-36,-112,-64,-31,20,-52,-79,-7,-113,94,-30,-100,73,55,-111,-1,87,-29,-25,-94,42,-13,-63,-59,108,38,-16,-62,-85,-17,0,-90,47,116,-80,12,-11,-54,96,-12,-110,-6,-128,-64,-31,-109,103,58,-11,-118,-3,0,-102,64,39,-18,-67,93,95,102,-87,104,88,-62,-31,-36,-61,-105,-26,46,-53,117,93,-70,-54,-103,121,52,-24,82,-10,-124,-22,-122,29,84,-76,121,-64,-65,-6,80,52,-27,7,108,-118,64,-82,-44,73,81,-107,84,-88,-100,-59,-56,9,35,-39,-82,-68,26,65,-66,-73,-15,75,-31,-44,51,-65,-73,-62,100,51,78,-51,-112,-84,82,-19,93,-92,-69,53,-38,-66,127,5,-30,61,26,43,48,-63,24,31,-71,-67,-127,-60,-55,-26,38,-43,-63,-49,-37,-101,116,105,-109,10,3,-67,17,-42,-89,110,62,-103,-41,78,-47,-59,-47,-17,-51,10,-16,-31,68,-41,37,15,-123,94,101,77,116,-122,61,-96,-122,-8,-11,105,-74,109,-97,-111,114,44,105,45,42,-94,-99,-52,122,-113,87,-59,-109,85,-128,120,-49,21,-75,-89,-10,11,120,-51,-19,30,-79,-26,64,-32,-71,28,-11,-44,55,-28,109,59,-84,-22,-55,-113,-105,114,80,50,-26,77,54,36,42,-71,-64,-111,118,99,-121,-100,-128,56,-75,-10,-74,30,36,93,-122,16,-50,-105,85,19,-84,-99,-72,-20,96,-63,75,-53,59,-86,90,-23,-39,-73,96,-118,-127,-9,-106,42,-84,-122,108,-18,81,29,-58,46,94,12,-2,-94,-75,33,85,61,-100,122,2,101,106,45,-49,-43,-63,22,-128,94,5,-115,38,35,54,-8,15,35,87,-114,-76,110,37,-50,20,-114,84,115,-13,48,54,14,-58,-93,112,43,77,9,32,-99,-91,-55,34,-82,23,-40,17,62,66,84,82,-3,117,-100,33,32,19,-100,102,93,101,-33,-103,112,-38,114,38,-1,-89,-90,-86,-9,-101,-66,41,-71,-113,5,21,-40,50,89,-73,123,5,45,-75,68,58,-107,-67,3,-64,89,45,-117,51,16,-119,36,69,-78,-18,94,-18,61,22,-124,97,-55,-97,112,19,119,7,65,-109,23,-15,88,-47,-103,-84,-62,106,-5,-108,73,-109,34,-116,33,81,-41,-102,81,67,20,67,-46,-40,-9,10,-49,121,-57,61,-33,28,42,-36,-67,-113,-38,-94,-89,-67,-28,-17,52,-116,-96,-51,117,29,-84,-53,-38,-53,-44,54,-110,98,-76,117,18,83,10,-62,-36,102,104,80,124,34,15,108,47,91,-112,-10,-116,66,-68,-123,55,-67,87,51,74,-47,25,-122,-34,57,32,96,-96,-64,67,-41,31,-124,-87,-15,76,-125,1,-77,13,99,47,-44,74,97,67,-4,108,-9,-16,44,36,-53,3,-120,105,99,-55,-34,-30,118,8,106,40,-95,-122,-65,14,-23,86,-26,-64,114,89,-59,97,-10,71,10,-108,-60,61,-87,-19,-4,-28,-1,-32,35,-123,55,109,-47,-126,-1,-124,-36,120,3,-107,-17,121,-80,31,25,79,-32,127,-19,103,-4,118,21,-55,70,125,-95,-104,-78,-2,-24,90,-33,97,-79,-92,20,126,49,60,121,41,56,120,113,-102,74,1,-28,44,46,-19,-46,100,-127,77,-64,-8,-12,-13,11,-15,89,22,-95,86,36,-105,110,84,-83,37,-40,-56,-92,19,-82,-17,-25,83,33,4,-111,76,-85,-54,35,-107,-72,127,76,89,-103,-123,28,-96,-47,95,77,107,-35,-98,52,59,-76,75,87,-14,-56,-27,75,117,-34,67,91,-92,-95,-45,-116,-13,-81,5,-35,83,10,85,-112,-38,117,89,43,123,-73,-43,104,36,-106,-80,47,113,-82,51,36,93,33,-84,11,-53,-128,-84,82,-86,-118,0,-33,-6,44,-122,35,81,-71,-44,-73,-64,126,98,-20,-49,-126,-104,46,44,-63,-17,-62,-74,-61,-48,-28,67,-25,-99,92,66,73,-38,49,45,-69,92,-26,-91,80,105,-30,48,-76,85,108,-98,-56,-95,102,47,6,-70,-118,-31,60,-112,-62,89,115,-78,-85,4,36,-1,72,-17,-100,-56,-2,-104,24,-54,-56,-92,-106,-60,-115,-53,-106,49,85,33,-79,54,-77,44,-120,47,41,-60,44,-8,-28,5,90,114,42,74,106,-57,-81,79,83,-67,-97,-90,-120,-16,-57,-88,34,9,7,-107,-59,-92,40,71,-32,113,-85,89,33,89,-58,-78,-50,-22,58,96,66,-19,-125,-39,-42,90,25,70,-104,-31,-90,-21,98,118,-111,102,-35,44,-117,60,86,-62,-47,-4,14,-88,46,79,6,-81,-5,101,99,-12,96,43,-27,42,65,-3,-120,-93,112,32,-6,-111,89,105,122,-67,50,57,-54,-126,-46,35,48,-41,0,-98,71,-22,45,-125,7,81,-26,23,-60,118,25,101,-95,-128,117,22,-126,-29,74,86,-39,-53,65,-86,64,-62,-77,-8,90,-85,54,-28,-128,124,-1,-112,127,105,-124,-40,63,123,123,-77,13,-84,-5,53,-31,-46,-74,-36,27,-16,13,-124,-98,-24,-115,-83,48,101,92,13,-98,-5,-111,-10,-40,-51,-115,-81,-52,-82,24,102,97,98,109,107,-46,-1,109,50,-48,40,-23,71,34,-70,-13,-111,110,43,-41,-9,108,-1,37,45,-72,-28,-45,-50,9,121,-66,-4,-86,-10,18,16,64,-119,-36,33,-13,5,-125,93,-6,19,-61,126,95,48,-116,11,125,-62,-6,67,-1,111,-54,2,45,82,-103,-4,-66,19,20,18,15,48,94,-91,119,33,82,-15,116,-24,15,67,30,111,-106,90,13,80,-20,71,65,66,108,124,-94,-104,-124,120,-95,59,-80,16,83,-101,90,14,-96,25,-64,-38,98,-24,-17,-69,-89,108,-29,-30,-101,-11,99,13,-56,53,72,52,105,105,88,2,26,75,23,-13,3,122,-114,71,-70,-29,-9,-98,58,67,-122,87,126,7,-30,111,-61,69,7,11,-6,103,-6,-16,-32,56,23,94,-31,29,-63,-47,5,67,61,110,43,57,54,41,28,74,-65,97,-22,74,-115,-126,86,0,-50,-83,-93,-3,116,5,22,-29,21,-79,34,-54,68,77,-34,-76,84,-116,-102,-31,-13,-55,64,85,-42,44,43,-115,85,100,-104,-60,103,-54,-65,120,-69,44,59,-102,107,81,89,-79,-44,121,70,-24,-110,51,76,75,117,-7,110,61,-102,42,-28,-28,-67,-12,-19,102,-27,18,115,121,-46,68,-124,-81,-110,-33,108,56,-83,30,-97,4,-79,-17,88,114,-86,105,17,-9,0,61,101,11,7,14,-100,58,-38,-42,27,121,119,-48,56,62,94,39,-20,-49,7,26,108,-99,-44,120,-2,87,-117,-78,-56,64,76,-83,26,-105,21,-3,81,8,-74,-100,67,50,9,58,-14,-118,-96,-13,27,65,-122,-73,-83,102,-40,-60,-120,-13,16,51,-51,112,-81,-15,-7,127,100,-116,-20,83,-72,59,-39,121,-43,114,55,97,-9,-53,107,56,45,49,106,-102,-126,-54,-44,59,18,-64,-75,101,62,-123,-110,-70,-17,24,57,-44,-122,104,-119,43,-40,18,-113,-107,25,122,-90,-19,123,74,-86,-35,107,102,-51,-22,56,-14,109,-100,-124,1,-85,35,-16,-124,-21,-65,1,30,-75,55,67,-121,-78,109,-102,82,-94,-23,-60,46,-104,0,-96,6,39,12,101,62,-39,37,-84,-92,3,48,68,34,-47,26,-67,60,-2,25,118,-110,77,91,46,2,43,103,-85,-107,-23,83,-23,-71,-110,-7,42,43,-82,16,57,-55,-102,-52,-32,32,-111,-70,75,116,116,-11,-44,-75,1,-14,-123,-128,-85,31,71,33,78,-72,-102,70,48,-72,-15,60,56,38,79,93,-83,114,75,-6,120,-78,25,-127,82,112,-37,-90,-92,-121,-112,-35,119,8,-32,-35,77,58,-9,109,-107,69,-21,11,-42,-128,-70,48,-23,-30,-78,-81,-123,30,-40,-8,-127,106,9,64,-78,-51,122,95,81,-109,-15,-43,118,27,-92,88,-109,37,-106,52,-62,-8,119,-45,73,65,127,-96,53,-115,-125,46,89,47,115,8,70,71,-40,-107,15,24,-119,-64,41,115,54,-11,-108,-103,-20,6,104,-67,-8,95,90,102,19,15,-22,73,13,-7,113,55,-53,-123,51,-110,40,37,-103,-83,-61,34,114,59,-25,-113,87,-103,-26,-10,88,-121,-65,-79,92,-63,123,-62,59,31,-87,-11,31,113,14,88,23,25,35,-49,-21,-83,-59,53,109,-72,-22,-64,89,59,-104,-42,24,52,-60,62,91,3,7,-21,61,15,-117,-109,65,-1,-39,25,-34,-37,26,-2,62,-51,61,24,50,-15,-32,-48,-55,25,36,24,6,99,94,-25,86,-84,-30,-95,-102,-94,-53,29,-81,65,69,-85,65,117,-7,0,-23,-66,-75,127,62,-108,10,-5,-4,66,29,-59,41,-82,-55,58,65,9,-128,55,-67,-58,-28,123,-121,99,-70,-99,11,-6,122,-108,119,-18,1,78,61,103,121,-104,117,-68,-22,-108,64,31,-68,-68,52,-96,41,58,-54,11,-26,118,75,14,-54,21,-119,60,-66,-19,-64,11,-5,76,-9,-97,81,-126,72,62,-115,64,23,117,65,73,-121,-87,-40,-48,-82,90,73,-91,42,57,-53,54,6,-11,102,-104,0,-117,70,52,103,-56,104,-1,-103,-12,32,59,123,12,-75,-104,16,-123,31,-35,55,20,-116,-109,-50,-44,-63,24,35,76,-116,-29,-32,16,-43,-68,-56,-115,32,109,-9,-34,126,-39,-74,74,-46,-19,-105,-82,-115,32,17,94,105,-103,-50,68,-121,-29,-7,53,74,77,-123,98,-68,37,62,-8,-21,-23,-99,4,-80,-103,-58,45,-2,-95,58,5,35,19,-37,-65,108,-14,-90,35,-53,-123,28,-5,39,-21,-38,17,70,-53,30,94,62,24,-74,34,14,101,46,20,-61,94,-121,125,-122,88,-127,36,-97,-98,110,80,80,14,72,10,8,95,4,50,113,27,-124,54,-117,-48,122,-39,52,8,94,61,40,-69,21,-34,7,-56,-90,-123,24,23,57,89,-87,-97,-80,-16,63,-50,76,-118,-25,-17,90,24,-4,-112,32,-94,58,-32,-12,11,28,48,-38,118,-69,107,92,61,-104,116,-62,-112,55,-110,0,127,-46,-54,-57,17,116,54,-36,-90,114,-39,-32,53,33,-69,37,72,-70,121,60,-84,22,-95,-74,-105,-7,-67,-41,-49,55,98,-57,60,-51,-107,31,48,48,-72,-38,-35,-5,29,65,-102,78,79,-8,71,-113,122,90,76,-55,-31,77,102,-66,107,-128,112,101,122,-62,-83,111,126,101,-75,-55,-118,68,52,-128,115,76,63,32,-6,90,6,100,-109,-59,98,19,109,-1,114,84,-58,-52,79,95,121,114,-77,-52,56,-114,-13,67,91,-51,50,-94,-115,113,-58,-33,56,55,-92,-120,80,-85,-125,126,-114,44,-126,22,-29,113,-82,-92,91,63,-39,-34,-90,-21,43,-3,113,-5,-81,-91,69,120,-59,-126,127,66,43,113,-111,47,-99,-46,-73,55,-13,-7,73,110,37,-76,68,13,105,94,-36,108,10,-127,-76,10,126,100,21,-117,-80,21,-95,94,-79,77,-72,-63,98,24,93,-124,7,25,-15,84,-62,-99,28,-82,-99,113,-65,13,62,-51,-117,37,115,-125,-40,-96,85,70,31,-27,26,2,57,-15,43,-112,-36,-72,-5,106,44,126,-97,111,-31,-66,-89,76,-114,51,-111,120,69,56,-106,-70,1,105,-54,-56,-8,-123,-92,-71,40,-20,-52,-93,-102,76,-104,48,77,76,-30,53,-113,40,-16,88,44,34,-107,53,18,95,-21,123,-115,-28,53,21,47,76,82,-58,-114,22,-104,-97,-90,73,109,7,-108,-96,-30,89,-84,-46,-47,-62,110,-128,25,-54,-75,55,-62,121,42,69,-62,54,25,7,-75,122,87,-68,88,-83,-95,38,-100,-103,-96,-57,74,109,-34,72,51,86,89,66,120,85,18,-84,95,101,-86,-32,15,48,-104,62,-99,115,43,-14,76,76,-92,-5,27,-8,41,-114,-74,50,-77,-67,-97,-109,16,106,-36,-52,85,16,50,-68,-27,-22,-99,-112,122,63,-15,64,23,23,121,54,-31,64,126,76,16,-57,18,-75,97,-23,-94,-94,72,-53,-40,30,-55,-63,87,-13,116,9,-64,-72,11,-90,-45,11,59,44,110,28,-105,-80,62,-27,20,46,-7,45,57,5,35,126,29,77,-91,-65,-60,10,-56,-115,-42,-17,115,-67,34,56,12,39,-119,-66,-20,22,-39,-102,54,108,1,-75,107,14,-104,-87,-127,-17,-88,33,103,-71,-85,23,-76,-95,-94,107,-102,92,-96,121,61,-98,78,-28,-33,33,75,32,-10,-14,-125,-96,-72,-4,10,7,-65,-52,-27,-71,92,100,61,45,87,9,-43,-52,110,-70,19,-110,45,-66,-74,-126,91,-27,106,58,-110,114,-86,-77,-52,-63,-50,67,-65,-54,33,37,116,64,49,76,-7,-115,22,-105,-124,50,19,81,-126,86,124,-5,-37,-48,19,-65,32,-21,80,-124,-93,-23,-25,16,24,97,65,29,51,56,-79,80,-117,-50,14,-23,-77,87,96,125,-52,49,2,13,55,61,107,93,-106,-116,102,-11,-37,-23,-119,-43,53,-39,-86,0,-96,19,13,15,15,112,24,76,-73,79,-76,-127,99,90,-18,63,119,3,-29,38,111,34,-66,111,-34,31,-29,-95,24,-70,5,-15,65,86,-43,16,76,-127,-120,21,6,-29,97,53,-31,-57,-39,-117,83,-48,-99,38,126,56,-78,-18,67,43,72,100,-96,-37,109,89,-92,94,-88,121,36,112,-33,-42,-69,-99,112,116,-80,-42,49,5,20,124,26,-32,26,-118,-28,65,22,13,-105,-98,81,124,40,52,-76,-104,97,82,59,96,-99,-27,-46,-74,-125,64,-36,-31,114,-28,-83,-61,81,-81,8,-49,42,36,48,-81,12,68,-80,83,38,-46,-115,93,-86,-56,62,-52,-36,-88,7,-85,-80,5,38,-106,-8,-94,-125,-81,123,21,122,-112,45,116,-37,81,48,-122,93,32,-120,48,-28,-85,-99,50,-47,-67,-109,78,-14,-79,10,-98,56,41,-22,-20,10,74,94,-30,-120,110,50,74,86,91,51,-86,43,-44,11,-11,65,127,-97,-24,-31,119,-16,-73,-66,87,-95,109,-64,98,-127,45,-30,24,-11,61,54,76,109,24,126,45,-1,-24,64,-28,28,-113,114,-32,-103,-125,122,95,102,-33,-7,-25,-28,-101,-7,63,109,111,-9,-45,73,-111,-41,-48,-70,-40,-113,28,-32,-41,-95,76,33,-112,-53,-106,75,117,71,-94,81,19,19,53,96,-9,125,-82,40,6,85,65,36,68,-91,59,9,65,91,-67,-34,121,65,125,-25,-38,-107,-106,-122,-83,20,109,45,122,-103,-31,-42,84,-42,23,-57,-69,49,27,41,-116,78,3,-65,-28,59,-52,-101,-29,-91,-29,37,86,113,119,-51,-104,-19,-84,42,-113,90,125,-32,65,37,-21,119,11,126,-13,-37,-49,59,-80,60,-114,90,7,-117,-22,-84,-50,4,69,58,-93,106,110,-77,-46,125,93,78,-124,-20,73,-42,75,-60,-52,-59,80,-5,-105,6,-14,-58,-72,-59,34,59,-96,-46,-102,76,-8,105,-49,-79,-47,-81,-94,93,77,-100,-119,-115,-115,-102,-68,69,107,-126,-86,-103,83,91,-26,-42,-84,73,-54,5,-104,-85,-61,-28,100,22,-71,-126,97,-43,-128,38,41,88,112,94,39,-84,-55,-119,-115,36,60,107,1,87,-45,-114,-80,-9,88,-105,-91,-67,90,-111,95,-96,-113,-103,-70,-24,91,-113,-122,-70,-83,-92,121,-20,117,37,-10,-105,126,82,89,81,-2,-118,-21,36,-9,-85,-103,124,65,-6,-45,118,-33,-5,122,-113,124,87,-30,58,-47,-43,-10,54,-116,88,44,-17,29,94,-59,-106,41,54,101,-86,98,-116,-12,106,-12,95,-29,13,-103,72,-73,55,6,122,124,-106,79,54,17,-93,7,-101,-72,69,-102,-43,71,31,-44,92,28,37,-104,127,-7,54,-50,-74,-35,-125,-16,-119,-17,28,-44,122,117,63,92,-23,14,82,-28,122,-90,-38,26,88,22,-74,127,115,-128,111,61,-41,-9,-104,31,112,29,37,53,-3,52,58,-27,66,-73,-76,27,78,-33,92,-125,39,95,110,-96,-61,-16,-125,80,-107,44,101,63,114,-101,47,-47,124,-31,21,-99,-57,46,24,-24,18,-104,121,68,-113,-76,37,-71,102,59,-10,-124,112,121,123,91,78,-14,-17,32,-82,2,49,102,-47,-30,-83,-19,-3,-50,67,-42,41,-21,-92,-72,117,-74,-111,97,26,18,-26,-78,104,67,41,48,122,-19,108,105,64,-45,-111,-45,43,-66,-80,115,84,-36,81,-31,59,28,60,-10,125,30,72,-64,105,45,52,-74,11,-16,38,-118,-3,98,-46,-77,40,-69,70,-114,-77,60,-70,123,83,-80,-102,42,100,81,109,-77,115,-127,7,-87,-22,8,-48,57,-72,-41,-41,-9,3,80,-54,-30,103,-16,-54,118,105,-87,-37,22,71,-33,-48,121,62,116,-90,66,-38,22,-105,19,-21,83,-41,112,-39,-81,-28,-109,31,-95,-125,-1,54,72,-84,-108,112,-114,89,120,-73,20,110,-55,-126,-58,-93,68,-105,65,-107,122,8,121,-103,-97,61,97,-74,99,-65,46,1,7,57,-122,69,100,-112,-94,94,116,23,106,85,-105,79,-128,-108,39,-111,-87,83,-66,112,24,-102,-7,-72,-97,-78,-8,99,-114,-113,79,115,89,-51,-88,83,28,-90,56,113,57,-102,40,-104,89,-76,-8,38,-67,-5,-9,-18,-121,38,27,-25,-29,-110,3,-10,16,123,-40,-93,116,-36,-20,-73,-18,-111,87,-123,113,120,-121,-97,69,-47,105,-68,-111,-97,-53,-94,-81,114,77,92,46,-37,-80,-18,108,-9,-69,-25,27,-46,-101,-86,53,54,-109,-44,-11,85,-61,-87,-17,34,-25,79,101,-46,-22,-30,99,85,-65,-30,12,117,-80,-23,54,-16,106,-89,-29,-120,64,1,-111,-94,-75,82,68,-3,120,11,-52,-103,87,22,-17,-46,-117,-63,112,12,-123,-52,71,-121,-122,-55,-125,101,-41,105,52,-53,-9,60,56,-3,-1,85,-112,15,127,70,4,-7,48,-72,34,-29,11,-103,114,-46,56,-109,17,-32,9,89,114,-1,92,86,-55,11,-87,-80,53,-18,-4,42,-90,86,15,-50,49,120,-46,22,67,57,-59,90,-97,110,96,119,43,100,-90,-54,-89,81,21,-80,-14,64,-47,126,-17,92,-37,51,40,121,-34,110,-99,-54,36,-73,85,-43,52,-30,-9,121,-18,-51,102,91,-116,-71,95,86,-55,95,-35,74,118,101,87,-114,20,-48,117,-60,-76,55,49,-108,74,-22,-43,20,41,79,-96,114,-12,-68,-44,43,126,-28,19,83,111,-128,102,-19,-110,56,71,-77,89,17,-16,-26,32,-27,-127,-14,-37,62,-34,-107,126,110,104,74,6,85,79,8,-74,107,30,126,-52,80,-11,29,108,65,-128,29,109,-2,123,59,28,-107,110,62,110,-123,-68,71,-39,-20,-57,-108,38,-36,126,-12,100,112,-103,-32,55,98,-5,-82,89,-41,88,36,-92,99,-56,118,97,12,113,-16,88,71,76,-96,-77,117,-5,60,-84,23,45,-41,31,46,33,0,-3,69,38,4,-119,-20,-115,96,-50,28,-9,-38,85,-113,-106,36,3,-96,-80,-23,7,-19,101,-111,92,-107,-9,116,53,-120,5,-3,-13,-87,1,-115,-35,-125,-89,-23,19,53,69,117,-67,-107,-33,-122,-32,-10,-69,-122,75,-116,-69,-35,43,-74,-107,109,18,107,-85,-48,52,-38,83,50,115,-101,-39,5,62,-7,-46,99,97,44,31,78,27,105,-117,-72,-94,-69,108,-86,-59,-30,49,-48,-22,-124,-2,-114,-19,-126,-29,-122,-21,67,15,60,-111,-55,35,-22,81,37,32,-75,0,56,-18,47,108,41,0,-120,122,-4,95,51,-68,-20,78,125,77,119,-9,-115,109,59,79,-128,-124,-114,9,7,91,-8,-80,11,-112,29,-32,-56,11,-50,-82,29,74,-19,-55,-6,12,-115,-6,18,15,-123,72,-15,-62,12,1,43,82,-30,-17,2,26,-30,-85,58,63,-56,-117,-100,52,-90,7,-69,-26,121,-92,111,5,-61,96,-90,63,-18,-11,60,-52,-81,99,125,25,67,-71,82,110,97,51,122,39,33,28,93,-116,123,-107,48,-64,-9,92,-31,-62,-68,-102,-103,-107,48,-100,-2,83,127,-82,41,-105,-7,-120,113,10,58,23,-122,84,-18,-37,20,-82,11,42,46,-95,16,-105,-58,-78,62,-82,-57,39,-18,106,0,52,-51,-59,36,76,98,124,-108,-67,-40,73,-3,19,45,-45,121,20,76,0,-21,-57,46,90,-18,79,66,-42,-56,-47,-39,-120,90,79,103,-104,34,-30,-67,120,94,35,59,25,-41,-128,125,88,88,68,-48,-25,-47,-10,-12,125,92,20,-99,55,66,118,-42,114,46,67,-9,43,37,119,-84,-8,79,-21,123,82,48,76,-63,-17,-23,27,-108,53,97,95,-109,41,68,-50,-32,-20,-119,-71,80,-57,-9,-16,-4,-36,17,66,19,82,-113,-76,39,23,-128,47,9,-87,30,-35,-48,100,96,15,-4,-58,-86,-10,-1,83,-52,17,-102,-88,37,-13,-2,-92,-23,-52,-89,-112,-33,-47,60,28,122,-101,-99,-67,92,-88,77,118,101,-96,-123,-108,-108,-43,102,45,44,-48,84,110,-25,-74,86,50,-7,-109,-9,-92,59,-67,79,29,23,53,-57,73,-89,9,1,81,65,17,31,-107,8,92,126,53,-119,52,98,60,-126,-82,15,79,-15,110,111,-82,22,88,-110,-113,-49,-124,-127,88,-51,-48,-87,-55,-17,62,45,64,41,-111,-95,-46,-122,-91,116,-125,-55,103,75,-29,95,-56,29,-115,-36,-41,-56,88,-100,-81,-33,-81,29,-11,-90,-17,77,-10,-127,-121,-6,30,-4,-24,30,-124,109,112,67,25,-57,4,34,79,126,126,-109,-47,-101,-38,-9,117,-76,37,-43,-120,-86,54,85,-70,56,39,-15,-40,-80,26,3,-64,-45,-35,-69,-120,70,-97,24,-29,-53,69,19,-113,-112,-53,-78,-106,-74,94,-61,78,-57,-58,97,46,58,62,-21,-121,-97,-38,-16,35,35,-120,-127,125,2,-30,54,-44,-17,9,30,-20,30,-53,117,52,29,-92,95,16,60,102,-29,54,-66,-110,122,10,-113,-78,68,-120,-71,-96,111,-37,9,39,-11,111,-52,-25,107,-77,-9,28,81,0,-55,-98,43,-97,-37,69,-123,-4,23,102,-98,106,-11,98,-42,5,115,-84,-121,-86,-78,11,-69,34,-115,3,-94,-104,-9,-38,51,-113,29,83,-39,86,54,-27,-116,-108,61,27,10,-44,65,-86,-91,34,-40,38,99,-14,101,-82,126,-56,-8,-102,37,-52,102,-36,126,74,95,-83,113,-37,-66,-55,-20,-98,-115,96,-49,-44,-123,-1,20,75,-2,-90,10,-61,107,94,87,-63,74,0,-55,2,41,-103,-123,-85,-13,-39,-107,36,-47,-21,6,-70,98,-119,78,52,26,-40,8,72,117,-78,115,76,-57,43,-60,-25,-87,36,83,54,127,127,-78,19,98,-30,125,86,121,124,62,-32,-96,-110,20,97,-126,-104,13,6,-122,-105,36,55,105,-121,-48,-83,0,-113,18,-114,-39,9,20,-20,-23,-115,-49,83,-107,121,70,-30,86,31,-48,-23,125,-67,-114,48,-86,21,-90,83,-79,64,-107,-60,-91,54,69,-73,-77,88,99,-10,15,-29,57,-128,-47,-96,101,-50,112,120,-85,-16,-78,27,7,116,-128,18,-11,49,-19,41,-33,15,-35,-67,84,-15,-57,36,-73,41,15,77,9,83,39,-54,27,-82,33,115,4,-60,101,46,-117,-56,-18,74,100,126,-27,-48,-25,10,-51,126,-41,-81,-95,-60,9,85,99,-6,80,-16,27,77,108,44,46,114,-26,20,-69,92,15,98,107,-114,-59,-87,28,-61,-121,84,125,-44,-125,-13,116,-55,-120,94,-84,-75,-86,34,1,-25,121,-80,26,-97,43,-12,31,75,-58,84,2,12,-109,-61,-68,-21,110,92,-27,-117,13,36,21,-3,107,-125,80,45,87,-108,22,41,-61,75,-115,-29,29,33,-111,-22,-4,-94,8,97,24,-124,25,25,-52,-7,-74,108,-36,-114,12,-32,3,84,75,-60,34,-88,-10,84,96,12,17,-119,114,-41,41,-3,-48,-16,1,-14,21,-115,-11,96,-25,-36,10,-14,-71,-3,-83,85,6,-91,-18,81,-108,36,-33,-59,70,-80,-81,11,-31,19,74,107,-22,91,8,29,57,-95,-80,-40,61,-82,-110,122,97,-114,-102,123,-77,83,122,-24,46,-121,-28,18,111,-47,-35,-120,-102,114,-93,115,22,-82,113,-78,77,76,-66,117,65,28,86,27,82,79,-128,-88,119,63,-31,87,11,124,-10,-99,-71,94,-89,76,-82,-124,101,58,-53,-74,9,-114,-50,31,-3,-51,-119,57,-29,-75,92,113,-47,40,-103,-81,-43,-12,-100,-102,4,-36,12,-26,-70,-118,27,-88,50,28,-73,-113,-94,-1,122,4,-57,-126,124,100,70,62,-87,7,-91,100,-91,-102,-56,34,102,118,44,-47,-90,24,-32,-99,30,-98,36,-124,113,11,-126,-15,-84,72,117,-46,3,-18,97,-38,-73,24,-47,109,-4,-50,-86,88,-112,-97,-65,112,-73,72,-37,20,-125,-29,-43,51,-2,-16,94,119,58,-101,-48,-116,121,94,103,64,52,48,51,-113,-70,106,41,-44,82,111,-106,71,-62,-105,-66,-78,78,71,115,-123,-50,4,33,22,88,-40,-111,-82,-46,-34,-67,120,-58,-28,-18,-126,-52,-31,-109,84,11,-94,10,94,-15,-89,-106,-62,125,-6,98,-39,62,-11,-34,12,12,-18,-50,-60,-78,43,104,36,50,-62,-58,-14,-36,-104,-88,21,78,-18,43,-124,-118,-68,-35,52,-62,102,18,25,87,-106,-78,74,29,127,98,-99,-2,-86,37,6,80,-31,86,77,112,-51,121,70,-126,7,35,-85,3,-24,-78,-109,114,-25,-58,-127,120,-78,26,8,-100,-116,10,-23,-20,14,-18,42,120,-75,79,60,44,-58,102,-104,69,25,119,28,103,-70,22,25,26,124,3,-11,-15,10,87,120,-23,-68,-44,7,93,9,-8,125,-15,-79,-70,108,15,-66,-90,-82,-5,-14,115,-122,-75,74,127,-100,108,4,58,66,-106,-117,1,6,11,-69,-96,55,-65,-8,102,-72,-41,75,76,-2,16,-10,78,-42,59,-72,-1,-31,-100,113,26,-66,48,-4,103,57,71,-94,-2,14,-28,-36,22,-8,-25,39,-51,25,99,91,70,63,11,-124,69,46,-34,-21,99,-70,-110,-90,32,116,34,-74,82,43,-104,-56,31,-117,-43,67,12,-72,115,-84,-62,-9,21,-30,105,82,94,86,12,40,-47,-39,40,-114,-67,-89,-72,-64,-62,-124,-105,32,95,-124,-41,-14,48,26,8,-116,-57,24,-45,-45,-75,-40,-111,-118,107,116,66,-97,-57,-79,-96,-85,-55,49,-55,-32,-87,-76,-12,42,-85,85,-16,75,-41,-112,49,-29,-28,-124,-10,-60,62,-2,-112,15,-36,-33,81,-95,117,120,51,99,-64,30,11,106,-21,-42,43,-59,51,117,12,45,3,-116,110,88,104,60,67,102,-74,108,80,-58,-108,28,38,-108,16,63,100,-24,-36,-1,70,97,7,32,118,-112,-122,-31,-36,106,10,115,-89,35,58,-15,-5,63,19,-123,-99,-11,-94,108,-18,-13,70,-12,-1,126,-15,-9,-25,113,111,66,-59,81,-88,-114,97,-121,-76,16,8,72,62,3,-107,106,-43,92,-91,63,60,-90,-61,96,-9,93,-24,-17,-22,38,-24,29,-27,-36,-25,117,99,-10,76,66,-77,-71,33,-87,100,48,-13,-122,-49,56,-104,72,72,-84,103,72,115,-10,45,19,-22,52,-97,-77,-107,50,-81,-93,-79,102,-71,46,73,6,-21,-52,5,-96,32,112,15,-44,-4,110,5,-26,-85,89,-87,35,73,-17,59,-95,-5,-123,94,127,-83,9,-122,-64,-58,-72,-111,33,-91,-82,56,63,1,6,-67,-106,-55,26,-12,-105,-32,115,-38,-95,118,117,67,-17,95,99,120,-75,2,28,-113,-105,117,-15,111,22,-46,116,25,-91,40,44,84,37,-4,-66,-125,15,69,-14,49,-12,-11,87,-68,20,91,110,117,125,-65,-34,-36,84,-29,-87,-27,60,-66,-118,-125,49,69,81,54,7,-119,53,-23,-60,-9,22,-116,-125,-58} diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/ref_functions.h b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/ref_functions.h new file mode 100644 index 0000000..5a25ffa --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/ref_functions.h @@ -0,0 +1,250 @@ +/* + * Copyright (C) 2010-2018 Arm Limited or its affiliates. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _REF_FUNCTIONS_H_ +#define _REF_FUNCTIONS_H_ + +#include "arm_math.h" +#include "arm_nnfunctions.h" +//#include "arm_nnsupportfunctions.h" +#include "fully_connected_testing_weights.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +/* + * + * Convolution reference implemenation + * + */ + + void arm_convolve_HWC_q7_ref(const q7_t * Im_in, // input image + const uint16_t dim_im_in, // input image dimention + const uint16_t ch_im_in, // number of input image channels + const q7_t * wt, // kernel weights + const uint16_t ch_im_out, // number of filters, i.e., output image channels + const uint16_t dim_kernel, // filter kernel size + const uint16_t padding, // padding sizes + const uint16_t stride, // stride + const q7_t * bias, // bias + const uint16_t bias_shift, const uint16_t out_shift, q7_t * Im_out, // output image + const uint16_t dim_im_out, // output image dimension + q15_t * bufferA, //buffer space for input + q7_t * bufferB //buffer space for output + ); + + void arm_convolve_HWC_q7_ref_nonsquare(const q7_t * Im_in, // input image + const uint16_t dim_im_in_x, // input image dimention x + const uint16_t dim_im_in_y, // input image dimention y + const uint16_t ch_im_in, // number of input image channels + const q7_t * wt, // kernel weights + const uint16_t ch_im_out, // number of filters, i.e., output image channels + const uint16_t dim_kernel_x, // filter kernel size x + const uint16_t dim_kernel_y, // filter kernel size y + const uint16_t padding_x, // padding sizes x + const uint16_t padding_y, // padding sizes y + const uint16_t stride_x, // stride x + const uint16_t stride_y, // stride y + const q7_t * bias, // bias + const uint16_t bias_shift, const uint16_t out_shift, q7_t * Im_out, // output image + const uint16_t dim_im_out_x, // output image dimension x + const uint16_t dim_im_out_y, // output image dimension y + q15_t * bufferA, //buffer space for input + q7_t * bufferB //buffer space for output + ); + + void arm_convolve_HWC_q15_ref(const q15_t * Im_in, // input image + const uint16_t dim_im_in, // input image dimention + const uint16_t ch_im_in, // number of input image channels + const q15_t * wt, // kernel weights + const uint16_t ch_im_out, // number of filters, i.e., output image channels + const uint16_t dim_kernel, // filter kernel size + const uint16_t padding, // padding sizes + const uint16_t stride, // stride + const q15_t * bias, // bias + const uint16_t bias_shift, const uint16_t out_shift, q15_t * Im_out, // output image + const uint16_t dim_im_out, // output image dimension + q15_t * bufferA, //buffer space for input + q7_t * bufferB //buffer space for output + ); + void arm_convolve_HWC_q15_nonsquare_ref(const q15_t * Im_in, + const uint16_t dim_im_in_x, + const uint16_t dim_im_in_y, + const uint16_t ch_im_in, + const q15_t * wt, + const uint16_t ch_im_out, + const uint16_t dim_kernel_x, + const uint16_t dim_kernel_y, + const uint16_t padding_x, + const uint16_t padding_y, + const uint16_t stride_x, + const uint16_t stride_y, + const q15_t * bias, + const uint16_t bias_shift, + const uint16_t out_shift, + q15_t * Im_out, + const uint16_t dim_im_out_x, + const uint16_t dim_im_out_y, + q15_t * bufferA, + q7_t * bufferB); + + void arm_depthwise_separable_conv_HWC_q7_ref(const q7_t * Im_in, // input image + const uint16_t dim_im_in, // input image dimention + const uint16_t ch_im_in, // number of input image channels + const q7_t * wt, // kernel weights + const uint16_t ch_im_out, // number of filters, i.e., output image channels + const uint16_t dim_kernel, // filter kernel size + const uint16_t padding, // padding sizes + const uint16_t stride, // stride + const q7_t * bias, // bias + const uint16_t bias_shift, // amount of left-shift for bias + const uint16_t out_shift, // amount of right-shift for output + q7_t * Im_out, // output image + const uint16_t dim_im_out, // output image dimension + q15_t * bufferA, //buffer space for input + q7_t * bufferB //buffer space for output + ); + void arm_depthwise_separable_conv_HWC_q7_ref_nonsquare(const q7_t * Im_in, // input image + const uint16_t dim_im_in_x, // input image dimention x + const uint16_t dim_im_in_y, // input image dimention y + const uint16_t ch_im_in, // number of input image channels + const q7_t * wt, // kernel weights + const uint16_t ch_im_out, // number of filters, i.e., output image channels + const uint16_t dim_kernel_x, // filter kernel size x + const uint16_t dim_kernel_y, // filter kernel size y + const uint16_t padding_x, // padding sizes x + const uint16_t padding_y, // padding sizes y + const uint16_t stride_x, // stride x + const uint16_t stride_y, // stride y + const q7_t * bias, // bias + const uint16_t bias_shift, // amount of left-shift for bias + const uint16_t out_shift, // amount of right-shift for output + q7_t * Im_out, // output image + const uint16_t dim_im_out_x, // output image dimension x + const uint16_t dim_im_out_y, // output image dimension y + q15_t * bufferA, //buffer space for input + q7_t * bufferB //buffer space for output + ); + +/* + * + * Fully-connected reference implemenation + * + */ + + void arm_fully_connected_q7_ref(const q7_t * pV, // pointer to vector + const q7_t * pM, // pointer to matrix + const uint16_t dim_vec, // length of the vector + const uint16_t num_of_rows, // numCol of A + const uint16_t bias_shift, // amount of left-shift for bias + const uint16_t out_shift, // amount of right-shift for output + const q7_t * bias, q7_t * pOut, // output operand + q15_t * vec_buffer); + + void arm_fully_connected_q15_ref(const q15_t * pV, // pointer to vector + const q15_t * pM, // pointer to matrix + const uint16_t dim_vec, // length of the vector + const uint16_t num_of_rows, // numCol of A + const uint16_t bias_shift, // amount of left-shift for bias + const uint16_t out_shift, // amount of right-shift for output + const q15_t * bias, q15_t * pOut, // output operand + q15_t * vec_buffer); + + void arm_fully_connected_mat_q7_vec_q15_ref(const q15_t * pV, // pointer to vector + const q7_t * pM, // pointer to matrix + const uint16_t dim_vec, // length of the vector + const uint16_t num_of_rows, // numCol of A + const uint16_t bias_shift, // amount of left-shift for bias + const uint16_t out_shift, // amount of right-shift for output + const q7_t * bias, q15_t * pOut, // output operand + q15_t * vec_buffer); + + void arm_fully_connected_q7_opt_ref(const q7_t * pV, // pointer to vector + const q7_t * pM, // pointer to matrix + const uint16_t dim_vec, // length of the vector + const uint16_t num_of_rows, // numCol of A + const uint16_t bias_shift, // amount of left-shift for bias + const uint16_t out_shift, // amount of right-shift for output + const q7_t * bias, q7_t * pOut, // output operand + q15_t * vec_buffer); + + void arm_fully_connected_q15_opt_ref(const q15_t * pV, // pointer to vector + const q15_t * pM, // pointer to matrix + const uint16_t dim_vec, // length of the vector + const uint16_t num_of_rows, // numCol of A + const uint16_t bias_shift, // amount of left-shift for bias + const uint16_t out_shift, // amount of right-shift for output + const q15_t * bias, q15_t * pOut, // output operand + q15_t * vec_buffer); + + void arm_fully_connected_mat_q7_vec_q15_opt_ref(const q15_t * pV, // pointer to vector + const q7_t * pM, // pointer to matrix + const uint16_t dim_vec, // length of the vector + const uint16_t num_of_rows, // numCol of A + const uint16_t bias_shift, // amount of left-shift for bias + const uint16_t out_shift, // amount of right-shift for output + const q7_t * bias, q15_t * pOut, // output operand + q15_t * vec_buffer); + +/* + * + * Pooling reference implemenation + * + */ + + void arm_avepool_q7_HWC_ref(const q7_t * Im_in, // input image + const uint16_t dim_im_in, // input image dimension + const uint16_t ch_im_in, // number of input image channels + const uint16_t dim_kernel, // window kernel size + const uint16_t padding, // padding sizes + const uint16_t stride, // stride + const uint16_t dim_im_out, // output image dimension + q7_t * bufferA, // a buffer for local storage + q7_t * Im_out); + + void arm_maxpool_q7_HWC_ref(const q7_t * Im_in, // input image + const uint16_t dim_im_in, // input image dimension + const uint16_t ch_im_in, // number of input image channels + const uint16_t dim_kernel, // window kernel size + const uint16_t padding, // padding sizes + const uint16_t stride, // stride + const uint16_t dim_im_out, // output image dimension + q7_t * bufferA, // a buffer for local storage + q7_t * Im_out); + +/* + * + * Other reference implemenation + * + */ + + void arm_relu_q7_ref(q7_t * data, uint16_t size); + + void arm_relu_q15_ref(q15_t * data, uint16_t size); + + void arm_nn_mult_q7_ref(q7_t * pSrcA, q7_t * pSrcB, q7_t * pDst, const uint16_t out_shift, uint32_t blockSize); + + void arm_nn_mult_q15_ref(q15_t * pSrcA, q15_t * pSrcB, q15_t * pDst, const uint16_t out_shift, uint32_t blockSize); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/arm_nnexamples_nn_test.cpp b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/arm_nnexamples_nn_test.cpp new file mode 100644 index 0000000..41088fe --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/arm_nnexamples_nn_test.cpp @@ -0,0 +1,801 @@ +/* ---------------------------------------------------------------------- +* Copyright (C) 2010-2018 Arm Limited. All rights reserved. +* +* +* Project: CMSIS NN Library +* Title: arm_nnexamples_nn_test.cpp +* +* Description: Example code for NN kernel testing. +* +* Target Processor: Cortex-M cores +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* - Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* - Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* - Neither the name of ARM LIMITED nor the names of its contributors +* may be used to endorse or promote products derived from this +* software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +* POSSIBILITY OF SUCH DAMAGE. +* -------------------------------------------------------------------- */ + +#include "arm_nnexamples_nn_test.h" + +//#define TEST_SIGMOID +//#define TEST_TANH +#define TEST_POOL +#define TEST_RELU +#define TEST_IP +#define TEST_CONV +#define TEST_NONSQUARE +#define TEST_NNMULT + +int test_index = 0; +q7_t test_flags[50]; +bool test_pass; + +int main() +{ + printf("start tests\n"); + + srand(1); + + // common pointers for testing data + q7_t *test1; + q15_t *test2; + q7_t *test3; + q15_t *test4; + + for (test_index = 0; test_index<50; test_index++) { + test_flags[test_index] = -1; + } + test_index = 0; + +#ifdef TEST_NNMULT +#define NNMULT_DIM 128 + test1 = new q7_t[NNMULT_DIM*2]; + test2 = new q15_t[NNMULT_DIM*2]; + test3 = new q7_t[NNMULT_DIM*2]; + test4 = new q15_t[NNMULT_DIM*2]; + + q7_t * mult_out_q7 = test3; + q7_t * mult_ref_q7 = test3 + NNMULT_DIM; + q15_t * mult_out_q15 = test4; + q15_t * mult_ref_q15 = test4 + NNMULT_DIM; + + for (int i=0;i= 2 || pool_out_opt[i] - pool_out_ref[i] >= 2) + { + printf("Output mismatch at %d, expected %d, actual %d\n", i, pool_out_ref[i], pool_out_opt[i]); + if_ave_pool_match = false; + } + } + if (if_ave_pool_match == true) + { + printf("Outputs match.\n"); + } + + delete[]test1; + delete[]test2; + delete[]test3; + +#endif + +#ifdef TEST_RELU + +#define RELU_DIM 127 + + test1 = new q7_t[RELU_DIM]; + test2 = new q15_t[RELU_DIM]; + test3 = new q7_t[RELU_DIM]; + test4 = new q15_t[RELU_DIM]; + + for (int i = 0; i < RELU_DIM; i++) + { + test1[i] = (rand() % 256 - 128); + test2[i] = (rand() % 65536 - 32768); + test3[i] = test1[i]; + test4[i] = test2[i]; + } + + q7_t *relu_ref_data_q7 = test1; + q7_t *relu_opt_data_q7 = test3; + q15_t *relu_ref_data_q15 = test2; + q15_t *relu_opt_data_q15 = test4; + + printf("Start ref relu q7 implementation\n"); + + arm_relu_q7_ref(relu_ref_data_q7, RELU_DIM); + + printf("Start opt relu q7 implementation\n"); + + arm_relu_q7(relu_opt_data_q7, RELU_DIM); + + verify_results_q7(relu_ref_data_q7, relu_opt_data_q7, RELU_DIM); + + printf("Start ref relu q15 implementation\n"); + + arm_relu_q15_ref(relu_ref_data_q15, RELU_DIM); + + printf("Start opt relu q15 implementation\n"); + + arm_relu_q15(relu_opt_data_q15, RELU_DIM); + + verify_results_q15(relu_ref_data_q15, relu_opt_data_q15, RELU_DIM); + + delete[]test1; + delete[]test2; + delete[]test3; + delete[]test4; + +#endif + +#ifdef TEST_IP + +#define IP_ROW_DIM 127 +#define IP_COL_DIM 127 + + q7_t ip_weights[IP_ROW_DIM * IP_COL_DIM] = IP2_WEIGHT; + q7_t ip_q7_opt_weights[IP_ROW_DIM * IP_COL_DIM] = IP4_WEIGHT; + q7_t ip_q7_q15_opt_weights[IP_ROW_DIM * IP_COL_DIM] = IP4_q7_q15_WEIGHT; + q15_t ip_q15_weights[IP_ROW_DIM * IP_COL_DIM] = IP2_WEIGHT; + q15_t ip_q15_opt_weights[IP_ROW_DIM * IP_COL_DIM] = IP4_WEIGHT_Q15; + + test1 = new q7_t[IP_COL_DIM + IP_ROW_DIM]; + test2 = new q15_t[IP_COL_DIM]; + test3 = new q7_t[IP_ROW_DIM * 3]; + test4 = new q15_t[IP_COL_DIM + IP_ROW_DIM * 2]; + + for (int i = 0; i < IP_ROW_DIM + IP_COL_DIM; i++) + { + test1[i] = rand() % 256 - 100; + } + for (int i = 0; i < IP_ROW_DIM * 3; i++) + { + test3[i] = 0; + } + + q7_t *ip_bias_q7 = test1 + IP_COL_DIM; + + q7_t *ip_out_q7_ref = test3; + q7_t *ip_out_q7_opt = test3 + IP_ROW_DIM; + q7_t *ip_out_q7_opt_fast = test3 + 2 * IP_ROW_DIM; + q15_t *ip_out_q15_ref = test4 + IP_COL_DIM; + q15_t *ip_out_q15_opt = test4 + IP_COL_DIM + IP_ROW_DIM; + + initialize_results_q7(ip_out_q7_ref, ip_out_q7_opt, IP_ROW_DIM); + initialize_results_q7(ip_out_q7_ref, ip_out_q7_opt_fast, IP_ROW_DIM); + initialize_results_q7(ip_out_q7_ref, ip_out_q7_opt_fast, IP_ROW_DIM); + + printf("Start ref q7 implementation\n"); + + arm_fully_connected_q7_ref(test1, ip_weights, IP_COL_DIM, IP_ROW_DIM, 1, 7, ip_bias_q7, ip_out_q7_ref, test2); + + printf("Start q7 implementation\n"); + + arm_fully_connected_q7(test1, ip_weights, IP_COL_DIM, IP_ROW_DIM, 1, 7, ip_bias_q7, ip_out_q7_opt, test2); + + verify_results_q7(ip_out_q7_ref, ip_out_q7_opt, IP_ROW_DIM); + + printf("Start q7 ref opt implementation\n"); + + arm_fully_connected_q7_opt_ref(test1, ip_q7_opt_weights, IP_COL_DIM, IP_ROW_DIM, 1, 7, ip_bias_q7, + ip_out_q7_opt_fast, test2); + + verify_results_q7(ip_out_q7_ref, ip_out_q7_opt_fast, IP_ROW_DIM); + + printf("Start q7 opt implementation\n"); + + arm_fully_connected_q7_opt(test1, ip_q7_opt_weights, IP_COL_DIM, IP_ROW_DIM, 1, 7, ip_bias_q7, ip_out_q7_opt_fast, + test2); + + verify_results_q7(ip_out_q7_ref, ip_out_q7_opt_fast, IP_ROW_DIM); + + for (int i = 0; i < IP_ROW_DIM + IP_COL_DIM; i++) + { + test4[i] = (rand() % 65536 - 32768); + } + + initialize_results_q15(ip_out_q15_ref, ip_out_q15_opt, IP_ROW_DIM); + + printf("Start ref q15 implementation\n"); + + arm_fully_connected_q15_ref(test4, ip_q15_weights, IP_COL_DIM, IP_ROW_DIM, 1, 7, test2, ip_out_q15_ref, NULL); + + printf("Start q15 implementation\n"); + + arm_fully_connected_q15(test4, ip_q15_weights, IP_COL_DIM, IP_ROW_DIM, 1, 7, test2, ip_out_q15_opt, NULL); + + verify_results_q15(ip_out_q15_ref, ip_out_q15_opt, IP_ROW_DIM); + + printf("Start ref opt q15 implementation\n"); + + arm_fully_connected_q15_opt_ref(test4, ip_q15_opt_weights, IP_COL_DIM, IP_ROW_DIM, 1, 7, test2, ip_out_q15_opt, + NULL); + + verify_results_q15(ip_out_q15_ref, ip_out_q15_opt, IP_ROW_DIM); + + printf("Start opt q15 implementation\n"); + + arm_fully_connected_q15_opt(test4, ip_q15_opt_weights, IP_COL_DIM, IP_ROW_DIM, 1, 7, test2, ip_out_q15_opt, NULL); + + verify_results_q15(ip_out_q15_ref, ip_out_q15_opt, IP_ROW_DIM); + + initialize_results_q15(ip_out_q15_ref, ip_out_q15_opt, IP_ROW_DIM); + + printf("Start ref q7_q15 implementation\n"); + + arm_fully_connected_mat_q7_vec_q15_ref(test4, ip_weights, IP_COL_DIM, IP_ROW_DIM, 1, 7, ip_bias_q7, ip_out_q15_ref, + test2); + + printf("Start q7_q15 implementation\n"); + + arm_fully_connected_mat_q7_vec_q15(test4, ip_weights, IP_COL_DIM, IP_ROW_DIM, 1, 7, ip_bias_q7, ip_out_q15_opt, + test2); + + verify_results_q15(ip_out_q15_ref, ip_out_q15_opt, IP_ROW_DIM); + + printf("Start ref opt q7_q15 implementation\n"); + + arm_fully_connected_mat_q7_vec_q15_opt_ref(test4, ip_q7_q15_opt_weights, IP_COL_DIM, IP_ROW_DIM, 1, 7, ip_bias_q7, + ip_out_q15_opt, test2); + + verify_results_q15(ip_out_q15_ref, ip_out_q15_opt, IP_ROW_DIM); + + printf("Start opt q7_q15 implementation\n"); + + arm_fully_connected_mat_q7_vec_q15_opt(test4, ip_q7_q15_opt_weights, IP_COL_DIM, IP_ROW_DIM, 1, 7, ip_bias_q7, + ip_out_q15_opt, test2); + + verify_results_q15(ip_out_q15_ref, ip_out_q15_opt, IP_ROW_DIM); + + delete[]test1; + delete[]test2; + delete[]test3; + delete[]test4; + +#endif + +#ifdef TEST_NONSQUARE + +/* Use RCONV to differential with square CONV */ + +#define RCONV_IM_DIM_X 10 +#define RCONV_IM_DIM_Y 8 +#define RCONV_IM_CH 4 +#define RCONV_KER_DIM_X 5 +#define RCONV_KER_DIM_Y 3 +#define RCONV_STRIDE_X 1 +#define RCONV_STRIDE_Y 1 +#define RCONV_PADDING_X 2 +#define RCONV_PADDING_Y 1 +#define RCONV_OUT_CH 4 +#define RCONV_OUT_DIM_X 10 +#define RCONV_OUT_DIM_Y 8 + + test1 = new q7_t[RCONV_KER_DIM_Y * RCONV_KER_DIM_X * RCONV_IM_CH * RCONV_OUT_CH + RCONV_OUT_CH]; + test2 = new q15_t[2 * RCONV_KER_DIM_Y * RCONV_KER_DIM_X * RCONV_IM_CH]; + test3 = + new q7_t[RCONV_IM_DIM_Y * RCONV_IM_DIM_X * RCONV_IM_CH + 2 * RCONV_OUT_DIM_Y * RCONV_OUT_DIM_X * RCONV_OUT_CH]; + + for (int i = 0; i < RCONV_KER_DIM_Y * RCONV_KER_DIM_X * RCONV_IM_CH * RCONV_OUT_CH + RCONV_OUT_CH; i++) + { + test1[i] = rand() % 256 - 100; + } + + for (int i = 0; + i < RCONV_IM_DIM_Y * RCONV_IM_DIM_X * RCONV_IM_CH + 2 * RCONV_OUT_DIM_Y * RCONV_OUT_DIM_X * RCONV_OUT_CH; i++) + { + test3[i] = rand() % 256 - 100; + } + + q7_t *rconv_weight_q7 = test1; + q7_t *rconv_bias_q7 = test1 + RCONV_KER_DIM_Y * RCONV_KER_DIM_X * RCONV_IM_CH * RCONV_OUT_CH; + + q15_t *rconv_buf = test2; + + q7_t *rconv_im_in_q7 = test3; + q7_t *rconv_im_out_ref_q7 = test3 + RCONV_IM_DIM_Y * RCONV_IM_DIM_X * RCONV_IM_CH; + q7_t *rconv_im_out_opt_q7 = + test3 + RCONV_IM_DIM_Y * RCONV_IM_DIM_X * RCONV_IM_CH + RCONV_OUT_DIM_Y * RCONV_OUT_DIM_X * RCONV_OUT_CH; + + initialize_results_q7(rconv_im_out_ref_q7, rconv_im_out_opt_q7, RCONV_OUT_DIM_Y * RCONV_OUT_DIM_X * RCONV_OUT_CH); + + printf("start conv q7 nonsquare ref implementation\n"); + arm_convolve_HWC_q7_ref_nonsquare(rconv_im_in_q7, RCONV_IM_DIM_X, RCONV_IM_DIM_Y, RCONV_IM_CH, rconv_weight_q7, + RCONV_OUT_CH, RCONV_KER_DIM_X, RCONV_KER_DIM_Y, RCONV_PADDING_X, RCONV_PADDING_Y, + RCONV_STRIDE_X, RCONV_STRIDE_Y, rconv_bias_q7, 1, 7, rconv_im_out_ref_q7, + RCONV_OUT_DIM_X, RCONV_OUT_DIM_Y, rconv_buf, NULL); + + printf("start conv q7 nonsquare opt implementation\n"); + arm_convolve_HWC_q7_fast_nonsquare(rconv_im_in_q7, RCONV_IM_DIM_X, RCONV_IM_DIM_Y, RCONV_IM_CH, rconv_weight_q7, + RCONV_OUT_CH, RCONV_KER_DIM_X, RCONV_KER_DIM_Y, RCONV_PADDING_X, RCONV_PADDING_Y, + RCONV_STRIDE_X, RCONV_STRIDE_Y, rconv_bias_q7, 1, 7, rconv_im_out_opt_q7, + RCONV_OUT_DIM_X, RCONV_OUT_DIM_Y, rconv_buf, NULL); + + verify_results_q7(rconv_im_out_ref_q7, rconv_im_out_opt_q7, RCONV_OUT_DIM_Y * RCONV_OUT_DIM_X * RCONV_OUT_CH); + + initialize_results_q7(rconv_im_out_ref_q7, rconv_im_out_opt_q7, RCONV_OUT_DIM_Y * RCONV_OUT_DIM_X * RCONV_OUT_CH); + + printf("start conv q7 nonsquare ref implementation\n"); + arm_convolve_HWC_q7_ref_nonsquare(rconv_im_in_q7, RCONV_IM_DIM_X, RCONV_IM_DIM_Y, RCONV_IM_CH, rconv_weight_q7, + RCONV_OUT_CH, RCONV_KER_DIM_X, RCONV_KER_DIM_Y, RCONV_PADDING_X, RCONV_PADDING_Y, + RCONV_STRIDE_X, RCONV_STRIDE_Y, rconv_bias_q7, 1, 7, rconv_im_out_ref_q7, + RCONV_OUT_DIM_X, RCONV_OUT_DIM_Y, rconv_buf, NULL); + + printf("start conv q7 nonsquare basic implementation\n"); + arm_convolve_HWC_q7_basic_nonsquare(rconv_im_in_q7, RCONV_IM_DIM_X, RCONV_IM_DIM_Y, RCONV_IM_CH, rconv_weight_q7, + RCONV_OUT_CH, RCONV_KER_DIM_X, RCONV_KER_DIM_Y, RCONV_PADDING_X, RCONV_PADDING_Y, + RCONV_STRIDE_X, RCONV_STRIDE_Y, rconv_bias_q7, 1, 7, rconv_im_out_opt_q7, + RCONV_OUT_DIM_X, RCONV_OUT_DIM_Y, rconv_buf, NULL); + + verify_results_q7(rconv_im_out_ref_q7, rconv_im_out_opt_q7, RCONV_OUT_DIM_Y * RCONV_OUT_DIM_X * RCONV_OUT_CH); + + initialize_results_q7(rconv_im_out_ref_q7, rconv_im_out_opt_q7, RCONV_OUT_DIM_Y * RCONV_OUT_DIM_X * RCONV_OUT_CH); + + printf("start 1x1 conv q7 nonsquare fast implementation\n"); + arm_convolve_HWC_q7_fast_nonsquare(rconv_im_in_q7, RCONV_IM_DIM_X, RCONV_IM_DIM_Y, RCONV_IM_CH, rconv_weight_q7, + RCONV_OUT_CH, 1, 1, 0, 0, RCONV_STRIDE_X, + RCONV_STRIDE_Y, rconv_bias_q7, 1, 7, rconv_im_out_ref_q7, RCONV_OUT_DIM_X, + RCONV_OUT_DIM_Y, rconv_buf, NULL); + + printf("start 1x1 conv q7 nonsquare dedicated function implementation\n"); + arm_convolve_1x1_HWC_q7_fast_nonsquare(rconv_im_in_q7, RCONV_IM_DIM_X, RCONV_IM_DIM_Y, RCONV_IM_CH, rconv_weight_q7, + RCONV_OUT_CH, 1, 1, 0, 0, RCONV_STRIDE_X, + RCONV_STRIDE_Y, rconv_bias_q7, 1, 7, rconv_im_out_opt_q7, RCONV_OUT_DIM_X, + RCONV_OUT_DIM_Y, rconv_buf, NULL); + + verify_results_q7(rconv_im_out_ref_q7, rconv_im_out_opt_q7, RCONV_OUT_DIM_Y * RCONV_OUT_DIM_X * RCONV_OUT_CH); + + printf("start depthwise separable conv q7 nonsquare ref implementation\n"); + arm_depthwise_separable_conv_HWC_q7_ref_nonsquare(rconv_im_in_q7, RCONV_IM_DIM_X, RCONV_IM_DIM_Y, RCONV_IM_CH, + rconv_weight_q7, RCONV_OUT_CH, RCONV_KER_DIM_X, RCONV_KER_DIM_Y, + RCONV_PADDING_X, RCONV_PADDING_Y, RCONV_STRIDE_X, RCONV_STRIDE_Y, + rconv_bias_q7, 1, 7, rconv_im_out_ref_q7, RCONV_OUT_DIM_X, + RCONV_OUT_DIM_Y, rconv_buf, NULL); + + printf("start depthwise separable conv q7 nonsquare opt implementation\n"); + arm_depthwise_separable_conv_HWC_q7_nonsquare(rconv_im_in_q7, RCONV_IM_DIM_X, RCONV_IM_DIM_Y, RCONV_IM_CH, + rconv_weight_q7, RCONV_OUT_CH, RCONV_KER_DIM_X, RCONV_KER_DIM_Y, + RCONV_PADDING_X, RCONV_PADDING_Y, RCONV_STRIDE_X, RCONV_STRIDE_Y, + rconv_bias_q7, 1, 7, rconv_im_out_opt_q7, RCONV_OUT_DIM_X, + RCONV_OUT_DIM_Y, rconv_buf, NULL); + + verify_results_q7(rconv_im_out_ref_q7, rconv_im_out_opt_q7, RCONV_OUT_DIM_Y * RCONV_OUT_DIM_X * RCONV_OUT_CH); + + delete[]test1; + delete[]test2; + delete[]test3; + + test2 = new q15_t[RCONV_KER_DIM_Y * RCONV_KER_DIM_X * RCONV_IM_CH * RCONV_OUT_CH + RCONV_OUT_CH]; // weights + bias + test4 = new q15_t[2 * RCONV_KER_DIM_Y * RCONV_KER_DIM_X * RCONV_IM_CH //buffer + + RCONV_IM_DIM_Y * RCONV_IM_DIM_X * RCONV_IM_CH + 2 * RCONV_OUT_DIM_Y * RCONV_OUT_DIM_X * RCONV_OUT_CH]; // i/o + + for (int i = 0; i < RCONV_KER_DIM_Y * RCONV_KER_DIM_X * RCONV_IM_CH * RCONV_OUT_CH + RCONV_OUT_CH; i++) + { + test2[i] = rand() % 256 - 100; + } + + for (int i = 0; + i < 2 * RCONV_KER_DIM_Y * RCONV_KER_DIM_X * RCONV_IM_CH + + RCONV_IM_DIM_Y * RCONV_IM_DIM_X * RCONV_IM_CH + 2 * RCONV_OUT_DIM_Y * RCONV_OUT_DIM_X * RCONV_OUT_CH; + i++) + { + test4[i] = rand() % 256 - 100; + } + + q15_t *rconv_weight_q15 = test2; + q15_t *rconv_bias_q15 = test2 + RCONV_KER_DIM_Y * RCONV_KER_DIM_X * RCONV_IM_CH * RCONV_OUT_CH; + + rconv_buf = test4; + + q15_t *rconv_im_in_q15 = test4 + 2 * RCONV_KER_DIM_Y * RCONV_KER_DIM_X * RCONV_IM_CH; + q15_t *rconv_im_out_ref_q15 = rconv_im_in_q15 + RCONV_IM_DIM_Y * RCONV_IM_DIM_X * RCONV_IM_CH; + q15_t *rconv_im_out_opt_q15 = rconv_im_out_ref_q15 + RCONV_OUT_DIM_Y * RCONV_OUT_DIM_X * RCONV_OUT_CH; + + initialize_results_q15(rconv_im_out_ref_q15, rconv_im_out_opt_q15, RCONV_OUT_DIM_Y * RCONV_OUT_DIM_X * RCONV_OUT_CH); + + printf("start conv q15 nonsquare ref implementation\n"); + arm_convolve_HWC_q15_nonsquare_ref(rconv_im_in_q15, RCONV_IM_DIM_X, RCONV_IM_DIM_Y, RCONV_IM_CH, rconv_weight_q15, + RCONV_OUT_CH, RCONV_KER_DIM_X, RCONV_KER_DIM_Y, RCONV_PADDING_X, RCONV_PADDING_Y, + RCONV_STRIDE_X, RCONV_STRIDE_Y, rconv_bias_q15, 1, 7, rconv_im_out_ref_q15, + RCONV_OUT_DIM_X, RCONV_OUT_DIM_Y, rconv_buf, NULL); + + printf("start conv q5 nonsquare opt implementation\n"); + arm_convolve_HWC_q15_fast_nonsquare(rconv_im_in_q15, RCONV_IM_DIM_X, RCONV_IM_DIM_Y, RCONV_IM_CH, rconv_weight_q15, + RCONV_OUT_CH, RCONV_KER_DIM_X, RCONV_KER_DIM_Y, RCONV_PADDING_X, RCONV_PADDING_Y, + RCONV_STRIDE_X, RCONV_STRIDE_Y, rconv_bias_q15, 1, 7, rconv_im_out_opt_q15, + RCONV_OUT_DIM_X, RCONV_OUT_DIM_Y, rconv_buf, NULL); + + verify_results_q15(rconv_im_out_ref_q15, rconv_im_out_opt_q15, RCONV_OUT_DIM_Y * RCONV_OUT_DIM_X * RCONV_OUT_CH); + + delete [] test2; + delete [] test4; +#endif + +#ifdef TEST_CONV + +#define CONV_IM_DIM 16 +#define CONV_IM_CH 16 +#define CONV_KER_DIM 5 +#define CONV_OUT_CH 16 +#define CONV_OUT_DIM 16 + + test1 = new q7_t[CONV_KER_DIM * CONV_KER_DIM * CONV_IM_CH * CONV_OUT_CH + CONV_OUT_CH]; + test2 = + new q15_t[CONV_KER_DIM * CONV_KER_DIM * CONV_IM_CH * CONV_OUT_CH + + 2 * CONV_KER_DIM * CONV_KER_DIM * CONV_IM_CH * CONV_OUT_CH + CONV_OUT_CH]; + test3 = new q7_t[CONV_IM_DIM * CONV_IM_DIM * CONV_IM_CH + 2 * CONV_OUT_DIM * CONV_OUT_DIM * CONV_OUT_CH]; + test4 = new q15_t[CONV_IM_DIM * CONV_IM_DIM * CONV_IM_CH + 2 * CONV_OUT_DIM * CONV_OUT_DIM * CONV_OUT_CH]; + + for (int i = 0; i < CONV_KER_DIM * CONV_KER_DIM * CONV_IM_CH * CONV_OUT_CH + CONV_OUT_CH; i++) + { + test1[i] = rand() % 256 - 100; + } + + for (int i = 0; + i < + CONV_KER_DIM * CONV_KER_DIM * CONV_IM_CH * CONV_OUT_CH + + 2 * CONV_KER_DIM * CONV_KER_DIM * CONV_IM_CH * CONV_OUT_CH + CONV_OUT_CH; i++) + { + test2[i] = (rand() % 65536 - 32768); + } + + for (int i = 0; i < CONV_IM_DIM * CONV_IM_DIM * CONV_IM_CH + 2 * CONV_OUT_DIM * CONV_OUT_DIM * CONV_OUT_CH; i++) + { + test3[i] = rand() % 256 - 100; + } + + for (int i = 0; i < CONV_IM_DIM * CONV_IM_DIM * CONV_IM_CH + 2 * CONV_OUT_DIM * CONV_OUT_DIM * CONV_OUT_CH; i++) + { + test4[i] = (rand() % 65536 - 32768); + } + + q7_t *conv_weight_q7 = test1; + q7_t *conv_bias_q7 = test1 + CONV_KER_DIM * CONV_KER_DIM * CONV_IM_CH * CONV_OUT_CH; + + q15_t *conv_weight_q15 = test2; + q15_t *conv_buf = test2 + CONV_KER_DIM * CONV_KER_DIM * CONV_IM_CH * CONV_OUT_CH; + q15_t *conv_bias_q15 = + test2 + CONV_KER_DIM * CONV_KER_DIM * CONV_IM_CH * CONV_OUT_CH + + 2 * CONV_KER_DIM * CONV_KER_DIM * CONV_IM_CH * CONV_OUT_CH; + + q7_t *conv_im_in_q7 = test3; + q7_t *conv_im_out_ref_q7 = test3 + CONV_IM_DIM * CONV_IM_DIM * CONV_IM_CH; + q7_t *conv_im_out_opt_q7 = + test3 + CONV_IM_DIM * CONV_IM_DIM * CONV_IM_CH + CONV_OUT_DIM * CONV_OUT_DIM * CONV_OUT_CH; + + q15_t *conv_im_in_q15 = test4; + q15_t *conv_im_out_ref_q15 = test4 + CONV_IM_DIM * CONV_IM_DIM * CONV_IM_CH; + q15_t *conv_im_out_opt_q15 = + test4 + CONV_IM_DIM * CONV_IM_DIM * CONV_IM_CH + CONV_OUT_DIM * CONV_OUT_DIM * CONV_OUT_CH; + + initialize_results_q7(conv_im_out_ref_q7, conv_im_out_opt_q7, CONV_OUT_DIM * CONV_OUT_DIM * CONV_OUT_CH); + + printf("start q7 ref implementation\n"); + + arm_convolve_HWC_q7_ref(conv_im_in_q7, CONV_IM_DIM, CONV_IM_CH, conv_weight_q7, + CONV_OUT_CH, CONV_KER_DIM, 2, 1, conv_bias_q7, 1, 7, conv_im_out_ref_q7, + CONV_OUT_DIM, conv_buf, NULL); + + printf("start q7 basic implementation\n"); + + arm_convolve_HWC_q7_basic(conv_im_in_q7, CONV_IM_DIM, CONV_IM_CH, conv_weight_q7, + CONV_OUT_CH, CONV_KER_DIM, 2, 1, conv_bias_q7, 1, 7, conv_im_out_opt_q7, + CONV_OUT_DIM, conv_buf, NULL); + + verify_results_q7(conv_im_out_ref_q7, conv_im_out_opt_q7, CONV_OUT_DIM * CONV_OUT_DIM * CONV_OUT_CH); + + printf("start q7 fast implementation\n"); + + arm_convolve_HWC_q7_fast(conv_im_in_q7, CONV_IM_DIM, CONV_IM_CH, conv_weight_q7, + CONV_OUT_CH, CONV_KER_DIM, 2, 1, conv_bias_q7, 1, 7, conv_im_out_opt_q7, + CONV_OUT_DIM, conv_buf, NULL); + + verify_results_q7(conv_im_out_ref_q7, conv_im_out_opt_q7, CONV_OUT_DIM * CONV_OUT_DIM * CONV_OUT_CH); + + // testing with RGB + printf("start q7 ref implementation for RGB\n"); + + arm_convolve_HWC_q7_ref(conv_im_in_q7, CONV_IM_DIM, 3, conv_weight_q7, + CONV_OUT_CH, CONV_KER_DIM, 2, 1, conv_bias_q7, 1, 7, conv_im_out_ref_q7, + CONV_OUT_DIM, conv_buf, NULL); + + printf("start q7 basic implementation for RGB\n"); + + arm_convolve_HWC_q7_basic(conv_im_in_q7, CONV_IM_DIM, 3, conv_weight_q7, + CONV_OUT_CH, CONV_KER_DIM, 2, 1, conv_bias_q7, 1, 7, conv_im_out_opt_q7, + CONV_OUT_DIM, conv_buf, NULL); + + verify_results_q7(conv_im_out_ref_q7, conv_im_out_opt_q7, CONV_OUT_DIM * CONV_OUT_DIM * CONV_OUT_CH); + + printf("start q7 RGB implementation for RGB\n"); + + arm_convolve_HWC_q7_RGB(conv_im_in_q7, CONV_IM_DIM, 3, conv_weight_q7, + CONV_OUT_CH, CONV_KER_DIM, 2, 1, conv_bias_q7, 1, 7, conv_im_out_opt_q7, + CONV_OUT_DIM, conv_buf, NULL); + + verify_results_q7(conv_im_out_ref_q7, conv_im_out_opt_q7, CONV_OUT_DIM * CONV_OUT_DIM * CONV_OUT_CH); + + // testing q15 + initialize_results_q15(conv_im_out_ref_q15, conv_im_out_opt_q15, CONV_OUT_DIM * CONV_OUT_DIM * CONV_OUT_CH); + + printf("start q15 ref implementation\n"); + + arm_convolve_HWC_q15_ref(conv_im_in_q15, CONV_IM_DIM, CONV_IM_CH, conv_weight_q15, + CONV_OUT_CH, CONV_KER_DIM, 2, 1, conv_bias_q15, 0, 15, conv_im_out_ref_q15, + CONV_OUT_DIM, conv_buf, NULL); + + printf("start q15 basic implementation\n"); + + arm_convolve_HWC_q15_basic(conv_im_in_q15, CONV_IM_DIM, CONV_IM_CH, conv_weight_q15, + CONV_OUT_CH, CONV_KER_DIM, 2, 1, conv_bias_q15, 0, 15, conv_im_out_opt_q15, + CONV_OUT_DIM, conv_buf, NULL); + + verify_results_q15(conv_im_out_ref_q15, conv_im_out_opt_q15, CONV_OUT_DIM * CONV_OUT_DIM * CONV_OUT_CH); + + printf("start q15 fast implementation\n"); + + arm_convolve_HWC_q15_fast(conv_im_in_q15, CONV_IM_DIM, CONV_IM_CH, conv_weight_q15, + CONV_OUT_CH, CONV_KER_DIM, 2, 1, conv_bias_q15, 0, 15, conv_im_out_opt_q15, + CONV_OUT_DIM, conv_buf, NULL); + + verify_results_q15(conv_im_out_ref_q15, conv_im_out_opt_q15, CONV_OUT_DIM * CONV_OUT_DIM * CONV_OUT_CH); + + // depthwise separable conv + initialize_results_q7(conv_im_out_ref_q7, conv_im_out_opt_q7, CONV_OUT_DIM * CONV_OUT_DIM * CONV_OUT_CH); + + printf("start q7 depthwise_separable_conv ref implementation\n"); + + arm_depthwise_separable_conv_HWC_q7_ref(conv_im_in_q7, CONV_IM_DIM, CONV_IM_CH, conv_weight_q7, + CONV_OUT_CH, CONV_KER_DIM, 2, 1, conv_bias_q7, 1, 7, conv_im_out_ref_q7, + CONV_OUT_DIM, conv_buf, NULL); + + printf("start q7 depthwise_separable_conv implementation\n"); + + arm_depthwise_separable_conv_HWC_q7(conv_im_in_q7, CONV_IM_DIM, CONV_IM_CH, conv_weight_q7, + CONV_OUT_CH, CONV_KER_DIM, 2, 1, conv_bias_q7, 1, 7, conv_im_out_opt_q7, + CONV_OUT_DIM, conv_buf, NULL); + + verify_results_q7(conv_im_out_ref_q7, conv_im_out_opt_q7, CONV_OUT_DIM * CONV_OUT_DIM * CONV_OUT_CH); + + delete[]test1; + delete[]test2; + delete[]test3; + delete[]test4; + +#endif + + test_pass = true; + test_index = 0; + while (test_flags[test_index] != -1) { + if (test_flags[test_index]) { + test_pass = false; + } + test_index ++; + } + if (test_pass) { + printf("All tests passed\n"); + } else { + printf("Test failed passed\n"); + } + + return 0; +} diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/arm_nnexamples_nn_test.h b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/arm_nnexamples_nn_test.h new file mode 100644 index 0000000..2e33988 --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/arm_nnexamples_nn_test.h @@ -0,0 +1,78 @@ +#ifndef _MAIN_H_ +#define _MAIN_H_ + +#include +#include +#include + +#include "arm_math.h" + +#include "arm_nnfunctions.h" +#include "ref_functions.h" + +extern int test_index; +extern q7_t test_flags[50]; + +void initialize_results_q7(q7_t * ref, q7_t * opt, int length) +{ + arm_fill_q7(0, ref, length); + arm_fill_q7(37, opt, length); +} + +void initialize_results_q15(q15_t * ref, q15_t * opt, int length) +{ + arm_fill_q15(0, ref, length); + arm_fill_q15(0x5F5, opt, length); +} + +void verify_results_q7(q7_t * ref, q7_t * opt, int length) +{ + + bool if_match = true; + + for (int i = 0; i < length; i++) + { + if (ref[i] != opt[i]) + { + printf("Output mismatch at %d, expected %d, actual %d\r\n", i, ref[i], opt[i]); + + if_match = false; + } + } + + if (if_match == true) + { + printf("Outputs match.\r\n\r\n"); + test_flags[test_index++] = 0; + } else { + test_flags[test_index++] = 1; + } + +} + +void verify_results_q15(q15_t * ref, q15_t * opt, int length) +{ + + bool if_match = true; + + for (int i = 0; i < length; i++) + { + if (ref[i] != opt[i]) + { + printf("Output mismatch at %d, expected %d, actual %d\r\n", i, ref[i], opt[i]); + + if_match = false; + } + } + + if (if_match == true) + { + printf("Outputs match.\r\n\r\n"); + test_flags[test_index++] = 0; + } else { + test_flags[test_index++] = 1; + } + +} + +#endif diff --git a/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/readme.txt b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/readme.txt new file mode 100644 index 0000000..0ea82e7 --- /dev/null +++ b/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/readme.txt @@ -0,0 +1,4 @@ +CMSIS DSP_Lib example arm_nnexample_nn_test for + Cortex-M3, Cortex-M4 and Cortex-M7. + +The example is configured for uVision Simulator. -- cgit v1.2.3