This problem is interactive. Refer to the Interaction section below for a better understanding.
Today was the first class of CS999.
First, you have learned non-negative integer less than or equal to 4×1018.
You have also learned the addition, subtraction, and comparison of two integers.
The homework is to compare two fractions BA and DC. Professor told you that you can solve homework only using classroom materials.
You are only allowed to use the following operations:
By using these operations, you have to compare two fractions.
You cannot get A, B, C, nor D directly in this problem.
Instead, you can use some operations to a hidden array of length 106; X_1,X_2,⋯,X_106.
Initially, X satisfies X_1=A, X_2=B, X_3=C, X_4=D, and X_i=0 for i greater than 4.
You can use the following commands to do operations:
To add two elements of X, print a string "+ i j k" (1≤i,j,k≤106). X_i will be replaced with a value of X_j+X_k.
To perform this operation, X_j+X_k must be less than or equal to 4×1018. If not, you will receive a verdict of "Wrong Answer". Nothing will be given to the input.
To subtract two elements of X, print a string "- i j k" (1≤i,j,k≤106). X_i will be replaced with a value of X_j−X_k.
To perform this operation, X_j≥X_k must be satisfied. If not, you will receive a verdict of "Wrong Answer". Nothing will be given to the input.
To compare two elements of X, print a string "< i j" (1≤i,j≤106). A line containing one integer will be given to the input.
-1" will be given when X_i\<X_j.0" will be given when X_i=X_j.1" will be given when X_i>X_j.After successfully comparing BA and DC,
! -1".! 0".! 1".If you ask more than 200,001 commands or make an invalid query, the interactor will terminate immediately and your program will receive the verdict "Wrong Answer".
If your comparison is incorrect, your score will be 0.
Otherwise, the score of the program will be graded with three factors: