package mytestprojekt;

import java.util.Scanner;

public class B1 {

	public static void main(String[] args) {
		
		Scanner sc=new Scanner(System.in);	
		Long n=sc.nextLong();
		Long a=sc.nextLong();
		sc.close();
		
	if (n>=n+1) {}
	else {System.out.println(-1);}

	}

}