import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long n=sc.nextLong();
		long a=sc.nextLong();
		long asd=a*3+(a-2)*3;
		long g=a-2;
		if(n<asd) {
			System.out.println(-1);
			return;
		}
		else if(n%2==0){
			System.out.println(a+" "+g);
			System.out.println(a+" "+g);
			n-=2*a+2*g;
			long g1=(n-2)/2;
			System.out.println((g1+2)+" "+g1);
		}
		else {
			System.out.println(a+" "+(g+1));
			System.out.println(a+" "+g);
			n-=2*a+2*g;
			long g1=(n-2)/2;
			System.out.println((g1+2)+" "+g1);
		}
	}
}