import java.util.Scanner;

public class Main {


	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int x = 0;
		boolean istax = false;
		int i = 1;
		for (; i < 1009 ; i++) {
			int x8 = (int)(i * 0.08);
			int x10 =(int)(i* 0.1);
			if(x8 == a && x10 == b) {
				istax = true;
				break;
			}
		}

		System.out.println(istax ? i : -1);

	}

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


	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int x = 0;
		boolean istax = false;
		int i = 1;
		for (; i < 1009 ; i++) {
			int x8 = (int)(i * 0.08);
			int x10 =(int)(i* 0.1);
			if(x8 == a && x10 == b) {
				istax = true;
				break;
			}
		}

		System.out.println(istax ? i : -1);

	}

} Main public static void main(String[] args){

		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int x = 0;
		boolean istax = false;
		int i = 1;
		for (; i < 1009 ; i++) {
			int x8 = (int)(i * 0.08);
			int x10 =(int)(i* 0.1);
			if(x8 == a && x10 == b) {
				istax = true;
				break;
			}
		}

		System.out.println(istax ? i : -1);

	} main {

		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int x = 0;
		boolean istax = false;
		int i = 1;
		for (; i < 1009 ; i++) {
			int x8 = (int)(i * 0.08);
			int x10 =(int)(i* 0.1);
			if(x8 == a && x10 == b) {
				istax = true;
				break;
			}
		}

		System.out.println(istax ? i : -1);

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan int x = 0; x 0 boolean istax = false; istax false int i = 1; i 1 for (; i < 1009 ; i++) {
			int x8 = (int)(i * 0.08);
			int x10 =(int)(i* 0.1);
			if(x8 == a && x10 == b) {
				istax = true;
				break;
			}
		} ; i < 1009 i 1009 i++ i++ i {
			int x8 = (int)(i * 0.08);
			int x10 =(int)(i* 0.1);
			if(x8 == a && x10 == b) {
				istax = true;
				break;
			}
		} {
			int x8 = (int)(i * 0.08);
			int x10 =(int)(i* 0.1);
			if(x8 == a && x10 == b) {
				istax = true;
				break;
			}
		} int x8 = (int)(i * 0.08); x8 (int)(i * 0.08) i 0.08 int x10 =(int)(i* 0.1); x10 (int)(i* 0.1) i 0.1 if(x8 == a && x10 == b) {
				istax = true;
				break;
			} x8 == a && x10 == b x8 == a x8 a x10 == b x10 b {
				istax = true;
				break;
			} istax = true istax true break; System.out.println(istax ? i : -1) System.out.println System.out System System.out istax ? i : -1 istax i -1 1 String[] args args public class Main {


	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int x = 0;
		boolean istax = false;
		int i = 1;
		for (; i < 1009 ; i++) {
			int x8 = (int)(i * 0.08);
			int x10 =(int)(i* 0.1);
			if(x8 == a && x10 == b) {
				istax = true;
				break;
			}
		}

		System.out.println(istax ? i : -1);

	}

} public class Main {


	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int x = 0;
		boolean istax = false;
		int i = 1;
		for (; i < 1009 ; i++) {
			int x8 = (int)(i * 0.08);
			int x10 =(int)(i* 0.1);
			if(x8 == a && x10 == b) {
				istax = true;
				break;
			}
		}

		System.out.println(istax ? i : -1);

	}

} Main
import java.util.Scanner;

public class Main {


	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int x = 0;
		boolean istax = false;
		int i = 1;
		for (; i < 1009 ; i++) {
			int x8 = (int)(i * 0.08);
			int x10 =(int)(i* 0.1);
			if(x8 == a && x10 == b) {
				istax = true;
				break;
			}
		}

		System.out.println(istax ? i : -1);

	}

}
