import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A= sc.nextInt(),B=sc.nextInt();
		int Amin= A*100/8, Amax=(A+1)*100/8,Bmin= B*100/10, Bmax=(B+1)*100/10;
		if(A%2==1) {
			Amin+=1;
		}
		int ans = -1;
		for(int i=Amin;i<Amax;i++) {
			if(Bmin<=i&&Bmax>i) {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A= sc.nextInt(),B=sc.nextInt();
		int Amin= A*100/8, Amax=(A+1)*100/8,Bmin= B*100/10, Bmax=(B+1)*100/10;
		if(A%2==1) {
			Amin+=1;
		}
		int ans = -1;
		for(int i=Amin;i<Amax;i++) {
			if(Bmin<=i&&Bmax>i) {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A= sc.nextInt(),B=sc.nextInt();
		int Amin= A*100/8, Amax=(A+1)*100/8,Bmin= B*100/10, Bmax=(B+1)*100/10;
		if(A%2==1) {
			Amin+=1;
		}
		int ans = -1;
		for(int i=Amin;i<Amax;i++) {
			if(Bmin<=i&&Bmax>i) {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int A= sc.nextInt(),B=sc.nextInt();
		int Amin= A*100/8, Amax=(A+1)*100/8,Bmin= B*100/10, Bmax=(B+1)*100/10;
		if(A%2==1) {
			Amin+=1;
		}
		int ans = -1;
		for(int i=Amin;i<Amax;i++) {
			if(Bmin<=i&&Bmax>i) {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A= sc.nextInt() A sc.nextInt() sc.nextInt sc B=sc.nextInt(); B sc.nextInt() sc.nextInt sc int Amin= A*100/8 Amin A*100/8 A*100 A 100 8 Amax=(A+1)*100/8 Amax (A+1)*100/8 (A+1)*100 (A+1) A 1 100 8 Bmin= B*100/10 Bmin B*100/10 B*100 B 100 10 Bmax=(B+1)*100/10; Bmax (B+1)*100/10 (B+1)*100 (B+1) B 1 100 10 if(A%2==1) {
			Amin+=1;
		} A%2==1 A%2 A 2 1 {
			Amin+=1;
		} Amin+=1 Amin 1 int ans = -1; ans -1 1 for(int i=Amin;i<Amax;i++) {
			if(Bmin<=i&&Bmax>i) {
				ans = i;
				break;
			}
		} int i=Amin; int i=Amin; i Amin i<Amax i Amax i++ i++ i {
			if(Bmin<=i&&Bmax>i) {
				ans = i;
				break;
			}
		} {
			if(Bmin<=i&&Bmax>i) {
				ans = i;
				break;
			}
		} if(Bmin<=i&&Bmax>i) {
				ans = i;
				break;
			} Bmin<=i&&Bmax>i Bmin<=i Bmin i Bmax>i Bmax i {
				ans = i;
				break;
			} ans = i ans i break; System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A= sc.nextInt(),B=sc.nextInt();
		int Amin= A*100/8, Amax=(A+1)*100/8,Bmin= B*100/10, Bmax=(B+1)*100/10;
		if(A%2==1) {
			Amin+=1;
		}
		int ans = -1;
		for(int i=Amin;i<Amax;i++) {
			if(Bmin<=i&&Bmax>i) {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}

} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A= sc.nextInt(),B=sc.nextInt();
		int Amin= A*100/8, Amax=(A+1)*100/8,Bmin= B*100/10, Bmax=(B+1)*100/10;
		if(A%2==1) {
			Amin+=1;
		}
		int ans = -1;
		for(int i=Amin;i<Amax;i++) {
			if(Bmin<=i&&Bmax>i) {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}

} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A= sc.nextInt(),B=sc.nextInt();
		int Amin= A*100/8, Amax=(A+1)*100/8,Bmin= B*100/10, Bmax=(B+1)*100/10;
		if(A%2==1) {
			Amin+=1;
		}
		int ans = -1;
		for(int i=Amin;i<Amax;i++) {
			if(Bmin<=i&&Bmax>i) {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}

}
