CF453B Little Pony and Harmony Chest
Description
Princess Twilight went to Celestia and Luna's old castle to research the chest from the Elements of Harmony.
A sequence of positive integers $ b_{i} $ is harmony if and only if for every two elements of the sequence their greatest common divisor equals 1. According to an ancient book, the key of the chest is a harmony sequence $ b_{i} $ which minimizes the following expression:
You are given sequence $ a_{i} $ , help Princess Twilight to find the key.
Input Format
N/A
Output Format
N/A