import java.util.Arrays;
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		
		int a = in.nextInt();
		int b = in.nextInt();
		
		double a_low = a / 0.08;
		double a_high = (a+1) / 0.08;
		double b_low = b / 0.1;
		double b_high = (b+1) / 0.1;
		double low = Math.max(a_low, b_low);
		double high = Math.min(a_high, b_high);
		if(high<=low) System.out.print("-1");
		//else if (high==low && (high%1!=0) && (low%1!=0)) System.out.print("-1");
		else {
//		System.out.println(low + " " + high);
		System.out.print((int)Math.ceil(low));
		}
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	
	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		
		int a = in.nextInt();
		int b = in.nextInt();
		
		double a_low = a / 0.08;
		double a_high = (a+1) / 0.08;
		double b_low = b / 0.1;
		double b_high = (b+1) / 0.1;
		double low = Math.max(a_low, b_low);
		double high = Math.min(a_high, b_high);
		if(high<=low) System.out.print("-1");
		//else if (high==low && (high%1!=0) && (low%1!=0)) System.out.print("-1");
		else {
//		System.out.println(low + " " + high);
		System.out.print((int)Math.ceil(low));
		}
	}
} Main public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		
		int a = in.nextInt();
		int b = in.nextInt();
		
		double a_low = a / 0.08;
		double a_high = (a+1) / 0.08;
		double b_low = b / 0.1;
		double b_high = (b+1) / 0.1;
		double low = Math.max(a_low, b_low);
		double high = Math.min(a_high, b_high);
		if(high<=low) System.out.print("-1");
		//else if (high==low && (high%1!=0) && (low%1!=0)) System.out.print("-1");
		else {
//		System.out.println(low + " " + high);
		System.out.print((int)Math.ceil(low));
		}
	} main {
		
		Scanner in = new Scanner(System.in);
		
		int a = in.nextInt();
		int b = in.nextInt();
		
		double a_low = a / 0.08;
		double a_high = (a+1) / 0.08;
		double b_low = b / 0.1;
		double b_high = (b+1) / 0.1;
		double low = Math.max(a_low, b_low);
		double high = Math.min(a_high, b_high);
		if(high<=low) System.out.print("-1");
		//else if (high==low && (high%1!=0) && (low%1!=0)) System.out.print("-1");
		else {
//		System.out.println(low + " " + high);
		System.out.print((int)Math.ceil(low));
		}
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int a = in.nextInt(); a in.nextInt() in.nextInt in int b = in.nextInt(); b in.nextInt() in.nextInt in double a_low = a / 0.08; a_low a / 0.08 a 0.08 double a_high = (a+1) / 0.08; a_high (a+1) / 0.08 (a+1) a 1 0.08 double b_low = b / 0.1; b_low b / 0.1 b 0.1 double b_high = (b+1) / 0.1; b_high (b+1) / 0.1 (b+1) b 1 0.1 double low = Math.max(a_low, b_low); low Math.max(a_low, b_low) Math.max Math a_low b_low double high = Math.min(a_high, b_high); high Math.min(a_high, b_high) Math.min Math a_high b_high if(high<=low) System.out.print("-1");
		//else if (high==low && (high%1!=0) && (low%1!=0)) System.out.print("-1");
		else {
//		System.out.println(low + " " + high);
		System.out.print((int)Math.ceil(low));
		} high<=low high low System.out.print("-1") System.out.print System.out System System.out "-1" {
//		System.out.println(low + " " + high);
		System.out.print((int)Math.ceil(low));
		} System.out.print((int)Math.ceil(low)) System.out.print System.out System System.out (int)Math.ceil(low) Math.ceil Math low String[] args args public class Main {
	
	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		
		int a = in.nextInt();
		int b = in.nextInt();
		
		double a_low = a / 0.08;
		double a_high = (a+1) / 0.08;
		double b_low = b / 0.1;
		double b_high = (b+1) / 0.1;
		double low = Math.max(a_low, b_low);
		double high = Math.min(a_high, b_high);
		if(high<=low) System.out.print("-1");
		//else if (high==low && (high%1!=0) && (low%1!=0)) System.out.print("-1");
		else {
//		System.out.println(low + " " + high);
		System.out.print((int)Math.ceil(low));
		}
	}
} public class Main {
	
	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		
		int a = in.nextInt();
		int b = in.nextInt();
		
		double a_low = a / 0.08;
		double a_high = (a+1) / 0.08;
		double b_low = b / 0.1;
		double b_high = (b+1) / 0.1;
		double low = Math.max(a_low, b_low);
		double high = Math.min(a_high, b_high);
		if(high<=low) System.out.print("-1");
		//else if (high==low && (high%1!=0) && (low%1!=0)) System.out.print("-1");
		else {
//		System.out.println(low + " " + high);
		System.out.print((int)Math.ceil(low));
		}
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		
		int a = in.nextInt();
		int b = in.nextInt();
		
		double a_low = a / 0.08;
		double a_high = (a+1) / 0.08;
		double b_low = b / 0.1;
		double b_high = (b+1) / 0.1;
		double low = Math.max(a_low, b_low);
		double high = Math.min(a_high, b_high);
		if(high<=low) System.out.print("-1");
		//else if (high==low && (high%1!=0) && (low%1!=0)) System.out.print("-1");
		else {
//		System.out.println(low + " " + high);
		System.out.print((int)Math.ceil(low));
		}
	}
}
