import java.util.*;

public class Main {
	void solve() {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		for(int i = 1; i <= 100000; i++) {
			if((int)(i * 0.08) == a && (int)(i * 0.1) == b) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
		scan.close();
	}
	
	public static void main(String[] args) {
		new Main().solve();
	}
} import java.util.*; util.* java public class Main {
	void solve() {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		for(int i = 1; i <= 100000; i++) {
			if((int)(i * 0.08) == a && (int)(i * 0.1) == b) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
		scan.close();
	}
	
	public static void main(String[] args) {
		new Main().solve();
	}
} Main void solve() {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		for(int i = 1; i <= 100000; i++) {
			if((int)(i * 0.08) == a && (int)(i * 0.1) == b) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
		scan.close();
	} solve {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		for(int i = 1; i <= 100000; i++) {
			if((int)(i * 0.08) == a && (int)(i * 0.1) == b) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
		scan.close();
	} 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 for(int i = 1; i <= 100000; i++) {
			if((int)(i * 0.08) == a && (int)(i * 0.1) == b) {
				System.out.println(i);
				return;
			}
		} int i = 1; int i = 1; i 1 i <= 100000 i 100000 i++ i++ i {
			if((int)(i * 0.08) == a && (int)(i * 0.1) == b) {
				System.out.println(i);
				return;
			}
		} {
			if((int)(i * 0.08) == a && (int)(i * 0.1) == b) {
				System.out.println(i);
				return;
			}
		} if((int)(i * 0.08) == a && (int)(i * 0.1) == b) {
				System.out.println(i);
				return;
			} (int)(i * 0.08) == a && (int)(i * 0.1) == b (int)(i * 0.08) == a (int)(i * 0.08) i 0.08 a (int)(i * 0.1) == b (int)(i * 0.1) i 0.1 b {
				System.out.println(i);
				return;
			} System.out.println(i) System.out.println System.out System System.out i return; System.out.println(-1) System.out.println System.out System System.out -1 1 scan.close() scan.close scan public static void main(String[] args) {
		new Main().solve();
	} main {
		new Main().solve();
	} new Main().solve() new Main().solve new Main() String[] args args public class Main {
	void solve() {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		for(int i = 1; i <= 100000; i++) {
			if((int)(i * 0.08) == a && (int)(i * 0.1) == b) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
		scan.close();
	}
	
	public static void main(String[] args) {
		new Main().solve();
	}
} public class Main {
	void solve() {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		for(int i = 1; i <= 100000; i++) {
			if((int)(i * 0.08) == a && (int)(i * 0.1) == b) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
		scan.close();
	}
	
	public static void main(String[] args) {
		new Main().solve();
	}
} Main
import java.util.*;

public class Main {
	void solve() {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		for(int i = 1; i <= 100000; i++) {
			if((int)(i * 0.08) == a && (int)(i * 0.1) == b) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
		scan.close();
	}
	
	public static void main(String[] args) {
		new Main().solve();
	}
}
