{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"In this problem, you are given an integer number **s**. You can transform any integer number **A** to another integer number **B** by adding **x** to **A**. This **x** is an integer number which is a prime factor of **A** (please note that 1 and **A** are not being considered as a factor of **A**). Now, your task is to find the minimum number of transformations required to transform **s** to another integer number **t**."}},{"title":"Input","value":{"format":"MD","content":"Input starts with an integer **T (\u0026#8804; 500)**, denoting the number of test cases.\n\nEach case contains two integers: **s (1 \u0026#8804; s \u0026#8804; 100)** and **t (1 \u0026#8804; t \u0026#8804; 1000)**."}},{"title":"Output","value":{"format":"MD","content":"For each case, print the case number and the minimum number of transformations needed. If it\u0027s impossible, then print `-1`."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e2\n6 12\n6 13\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1: 2\nCase 2: -1\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}