atcoder#APC001A. Two Integers

Two Integers

Score : 100100 points

Problem Statement

You are given positive integers XX and YY. If there exists a positive integer not greater than 101810^{18} that is a multiple of XX but not a multiple of YY, choose one such integer and print it. If it does not exist, print 1-1.

Constraints

  • 1X,Y1091 \leq X,Y \leq 10^9
  • XX and YY are integers.

Input

Input is given from Standard Input in the following format:

XX YY

Output

Print a positive integer not greater than 101810^{18} that is a multiple of XX but not a multiple of YY, or print 1-1 if it does not exist.

8 6
16

For example, 1616 is a multiple of 88 but not a multiple of 66.

3 3
-1

A multiple of 33 is a multiple of 33.