Hello! I would like to hear your thoughts about this task:
There are N (1 ≤ N ≤ 10000) numbered porcelain canaries on the table. Each canary colored in a color encrypted with the numbers (no more than 1000 colors). Robot has few requests with two integers: A (1 ≤ A ≤ 10000) and B (1 ≤ B ≤ 1000). Robot colors all canaries with sequence number multiple of A to color B. If A = 1 robot colors canaries with prime sequence number or with sequence number 1. Robot colors canaries regardless of their original colour. You need at the fewest number of requests and the fewest number of colorings to ensure that all canaries painted the same color. You have to output sequence of requests as an answer.