A. Assembly
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Consider a programming language called assembly. In this language, there are 4 registers named $$$A$$$, $$$B$$$, $$$C$$$ and $$$D$$$ which are initially equal to $$$0$$$ and can each store an integer between $$$-2^{31}$$$ and $$$2^{31}-1$$$ inclusive. A program written in this language consists of several lines, each containing an instruction. The execution of a program starts from the first line and each line is followed by the next one, except in the case of a GOTO instruction (described below). The available instructions are:

  • INPUT $$$X$$$ — Reads one number from the input and puts it into the register $$$X$$$.
  • OUTPUT $$$X$$$ — Outputs the value stored in the register $$$X$$$.
  • SET $$$X$$$ TO $$$Y$$$ — Puts the value $$$Y$$$ into the register $$$X$$$.
  • INCREASE $$$X$$$ BY $$$Y$$$ — Increases the value of the register $$$X$$$ by $$$Y$$$.
  • DECREASE $$$X$$$ BY $$$Y$$$ — Decreases the value of the register $$$X$$$ by $$$Y$$$.
  • GOTO $$$Z$$$ — If $$$Z=-1$$$, terminates the program, otherwise the execution jumps to the $$$Z^\text{th}$$$ line.
  • IF $$$Y_1 \star Y_2$$$ GOTO $$$Z_1$$$ ELSE GOTO $$$Z_2$$$ — If the value of expression $$$Y_1 \star Y_2$$$ is true, it is equivalent to GOTO $$$Z_1$$$, otherwise it is equivalent to GOTO $$$Z_2$$$.

Here:

  • $$$X$$$ is a register name.
  • Each of $$$Y$$$, $$$Y_1$$$ and $$$Y_2$$$ is a register name or an integer.
  • Each of $$$Z$$$, $$$Z_1$$$ and $$$Z_2$$$ is either $$$-1$$$ or an integer between $$$1$$$ and the number of lines in the program.
  • $$$\star$$$ is one the operators ==, !=, <, <=, > or >=.

Given two integers $$$n$$$ and $$$k$$$, your goal is to write an assembly program that does the following:

  1. Read a list of $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ from the input ($$$1 \le a_i \le 500$$$).
  2. Find the $$$k$$$ biggest prime numbers in the list. You may assume that there are at least $$$k$$$ prime numbers in the list.
  3. Output the product of these $$$k$$$ numbers, modulo $$$2023$$$.

Note that the assembly program should not read the values of n and k.

Input

The input contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le n \le 100$$$, $$$1 \le k \le 4$$$).

Output

On the first line, print one integer $$$m$$$ ($$$1 \le m \le 125$$$) — the number of lines in your program.

Then print $$$m$$$ more lines. The $$$i^\text{th}$$$ line should consist of the integer $$$i$$$ followed by the $$$i^\text{th}$$$ instruction of your assembly program.

You will receive the Wrong Answer verdict if the program you output:

  • gives a wrong answer, or
  • has more than 125 lines, or
  • contains a line that does not follow the correct syntax of an available instruction, or
  • executes more than $$$10^8$$$ instructions before terminating, or
  • stores a value outside the range $$$[-2^{31}, 2^{31}-1]$$$ into a register.
Example
Input
1 1
Output
2
1 INPUT A
2 OUTPUT A