import scala.annotation.tailrec import scala.io.StdIn.* @tailrec def gcd(a: Int, b: Int): Int = b match case 0 => a case _ => gcd(b, a % b) @main def main = val Array(n, m) = readLine().split(' ').map(_.toInt) val box = readLine().split(' ').map(_.toInt) val unit = box.reduce(gcd) val count = box.map(_ / unit).sum val ratio = m / count println(box.map(_ / unit * ratio).mkString(" "))