atcoder#APC001A. Two Integers
Two Integers
Score : points
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.
8 6
16
For example, is a multiple of but not a multiple of .
3 3
-1
A multiple of is a multiple of .