import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
	    int a = sc.nextInt();
	    int b = sc.nextInt();
	    int price = 10*b;
	    boolean flag = false;
	    for(int i = 0; i < 10; i++) {
	    	if((int)((price+i)*0.08) == a) {
	    		System.out.println(price+i);
	    		flag = true;
	    		break;
	    	}
	    }
	    if(flag == false) {
	    	System.out.println(-1);
	    }

	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
	    int a = sc.nextInt();
	    int b = sc.nextInt();
	    int price = 10*b;
	    boolean flag = false;
	    for(int i = 0; i < 10; i++) {
	    	if((int)((price+i)*0.08) == a) {
	    		System.out.println(price+i);
	    		flag = true;
	    		break;
	    	}
	    }
	    if(flag == false) {
	    	System.out.println(-1);
	    }

	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
	    int a = sc.nextInt();
	    int b = sc.nextInt();
	    int price = 10*b;
	    boolean flag = false;
	    for(int i = 0; i < 10; i++) {
	    	if((int)((price+i)*0.08) == a) {
	    		System.out.println(price+i);
	    		flag = true;
	    		break;
	    	}
	    }
	    if(flag == false) {
	    	System.out.println(-1);
	    }

	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
	    int a = sc.nextInt();
	    int b = sc.nextInt();
	    int price = 10*b;
	    boolean flag = false;
	    for(int i = 0; i < 10; i++) {
	    	if((int)((price+i)*0.08) == a) {
	    		System.out.println(price+i);
	    		flag = true;
	    		break;
	    	}
	    }
	    if(flag == false) {
	    	System.out.println(-1);
	    }

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int price = 10*b; price 10*b 10 b boolean flag = false; flag false for(int i = 0; i < 10; i++) {
	    	if((int)((price+i)*0.08) == a) {
	    		System.out.println(price+i);
	    		flag = true;
	    		break;
	    	}
	    } int i = 0; int i = 0; i 0 i < 10 i 10 i++ i++ i {
	    	if((int)((price+i)*0.08) == a) {
	    		System.out.println(price+i);
	    		flag = true;
	    		break;
	    	}
	    } {
	    	if((int)((price+i)*0.08) == a) {
	    		System.out.println(price+i);
	    		flag = true;
	    		break;
	    	}
	    } if((int)((price+i)*0.08) == a) {
	    		System.out.println(price+i);
	    		flag = true;
	    		break;
	    	} (int)((price+i)*0.08) == a (int)((price+i)*0.08) (price+i) price i 0.08 a {
	    		System.out.println(price+i);
	    		flag = true;
	    		break;
	    	} System.out.println(price+i) System.out.println System.out System System.out price+i price i flag = true flag true break; if(flag == false) {
	    	System.out.println(-1);
	    } flag == false flag false {
	    	System.out.println(-1);
	    } System.out.println(-1) System.out.println System.out System System.out -1 1 String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
	    int a = sc.nextInt();
	    int b = sc.nextInt();
	    int price = 10*b;
	    boolean flag = false;
	    for(int i = 0; i < 10; i++) {
	    	if((int)((price+i)*0.08) == a) {
	    		System.out.println(price+i);
	    		flag = true;
	    		break;
	    	}
	    }
	    if(flag == false) {
	    	System.out.println(-1);
	    }

	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
	    int a = sc.nextInt();
	    int b = sc.nextInt();
	    int price = 10*b;
	    boolean flag = false;
	    for(int i = 0; i < 10; i++) {
	    	if((int)((price+i)*0.08) == a) {
	    		System.out.println(price+i);
	    		flag = true;
	    		break;
	    	}
	    }
	    if(flag == false) {
	    	System.out.println(-1);
	    }

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
	    int a = sc.nextInt();
	    int b = sc.nextInt();
	    int price = 10*b;
	    boolean flag = false;
	    for(int i = 0; i < 10; i++) {
	    	if((int)((price+i)*0.08) == a) {
	    		System.out.println(price+i);
	    		flag = true;
	    		break;
	    	}
	    }
	    if(flag == false) {
	    	System.out.println(-1);
	    }

	}

}