(defn Partition [N M]
  (->> (range 1 (unchecked-inc-int(unchecked-divide-int M N)))
    reverse
    (filter #(and (zero? (unchecked-remainder-int M %)) (>= M (unchecked-multiply-int N %))))
    first))
(println (Partition (unchecked-int (read)) (unchecked-int (read))))