#include <stdio.h>
#include <stdlib.h>


int main()
{
    int A;
    long int N;
    int arr[10];
    int i,j,tem = 0,tema,arn = 0,x,total;
    scanf("%d %ld", &A ,&N);
    if(A < 3 * N){
        printf("-1");
        return 0;
    }
    if(A%3==0&&arn == 0)arn = 3;
    if(A%4==0&&arn == 0)arn = 4;
    if(A%5==0&&arn == 0){arn = 5;}
    else {arn = 3; tem = A%3;}
    switch(arn){
    case 3:j = 0;break;
    case 4:j = 1;break;
    case 5:j = 2;break;
    }
    for(i=0;i<2*arn;i+=2){
        if(i == arn - 2){
            
        }
        
        if(j != 0){
            
        }
    }
    
    return 0;
}