#apc001a. [apc001_a]Two Integers
[apc001_a]Two Integers
Problem Statement
You are given positive integers and . If there exists a positive integer not greater than that is a multiple of but not a multiple of , choose one such integer and print it. If it does not exist, print .
Constraints
- and are integers.
Input
Input is given from Standard Input in the following format:
Output
Print a positive integer not greater than that is a multiple of but not a multiple of , or print if it does not exist.
Sample Input 1
8 6
Sample Output 1
16
For example, is a multiple of but not a multiple of .
Sample Input 2
3 3
Sample Output 2
-1
A multiple of is a multiple of .