{"raw_statement":[{"iden":"statement","content":"Multiplication operation is not always easy! For example, it is hard to calculate 27 × 20 using your mind, but it is easier to find the answer using the following methods: 30 × 20 - 3 × 20. It turns out that people can calculate the multiplication of two special numbers very easily.\n\nA number is called special if it contains exactly one non-zero digit at the beginning (i.e. the most significant digit), followed by a non-negative number of zeros. For example, 30, 7, 5000 are special numbers, while 0, 11, 8070 are not.\n\nIn this problem, you are given two numbers a and b. Your task is to calculate the multiplication of a and b (a × b), by writing the multiplication expression as a summation or subtraction of multiplication of special numbers. Can you?\n\nThe first line contains an integer T (1 ≤ T ≤ 104) specifying the number of test cases.\n\nEach test case consists of a single line containing two integers a and b ( - 109 ≤ a, b ≤ 109, a ≠ 0, b ≠ 0), as described in the problem statement above.\n\nFor each test case, print a single line containing the multiplication expression of a and b as a summation or subtraction of multiplication of special numbers. All special numbers must be between  - 109 and 109 (inclusive). If there are multiple solutions, print any of them. It is guaranteed that an answer always exists for the given input.\n\nThe multiplication expression must be printed in exactly one line. A single term must be printed as  in which z and w are both special numbers, # represents a single space, and x represents the multiplication operation. Two consecutive terms must be printed as  in which z and w are both special numbers, # represents a single space,  represents the multiplication operation, and  represents either the addition operation  +  or the subtraction operation  - . (*Check the sample output for more clarification*).\n\n"},{"iden":"input","content":"The first line contains an integer T (1 ≤ T ≤ 104) specifying the number of test cases.Each test case consists of a single line containing two integers a and b ( - 109 ≤ a, b ≤ 109, a ≠ 0, b ≠ 0), as described in the problem statement above."},{"iden":"output","content":"For each test case, print a single line containing the multiplication expression of a and b as a summation or subtraction of multiplication of special numbers. All special numbers must be between  - 109 and 109 (inclusive). If there are multiple solutions, print any of them. It is guaranteed that an answer always exists for the given input.The multiplication expression must be printed in exactly one line. A single term must be printed as  in which z and w are both special numbers, # represents a single space, and x represents the multiplication operation. Two consecutive terms must be printed as  in which z and w are both special numbers, # represents a single space,  represents the multiplication operation, and  represents either the addition operation  +  or the subtraction operation  - . (*Check the sample output for more clarification*)."}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ T \\in \\mathbb{Z} $ be the number of test cases.  \nFor each test case $ k \\in \\{1, \\dots, T\\} $, let $ a_k, b_k \\in \\mathbb{Z} \\setminus \\{0\\} $ with $ -10^9 \\leq a_k, b_k \\leq 10^9 $.  \n\nA *special number* is an integer of the form $ \\pm d \\cdot 10^e $, where $ d \\in \\{1, 2, \\dots, 9\\} $ and $ e \\in \\mathbb{Z}_{\\geq 0} $.  \n\n**Constraints**  \n1. $ 1 \\leq T \\leq 10^4 $  \n2. $ a_k, b_k \\neq 0 $, and $ |a_k|, |b_k| \\leq 10^9 $  \n\n**Objective**  \nFor each test case, express $ a_k \\times b_k $ as a sum or difference of products of special numbers:  \n$$\na_k \\times b_k = \\sum_{i=1}^{m} \\epsilon_i \\cdot (s_i \\times t_i)\n$$  \nwhere:  \n- $ m \\in \\mathbb{Z}^+ $,  \n- $ \\epsilon_i \\in \\{+1, -1\\} $,  \n- $ s_i, t_i $ are special numbers,  \n- $ -10^9 \\leq s_i, t_i \\leq 10^9 $.  \n\nOutput the expression in the format:  \n- One term: `s x t`  \n- Multiple terms: `s1 x t1 [±] s2 x t2 [±] ...`  \n\n*(Any valid representation is acceptable.)*","simple_statement":"Write a × b as a sum or difference of products of special numbers.  \nA special number has one non-zero digit followed by zeros (like 30, 7, 5000).  \nFor each test case, print the expression using special numbers.","has_page_source":false}