import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;

public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args){

		solve_abc158_c();
	}
  
  	public static void solve_abc158_c(){

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int ans = -1;
		
		for(int i=1;i<=1250;i++){
			
			int c = (int)Math.floor(i * 0.08);
			int d = (int)Math.floor(i * 0.1);
			
			if(c == A && d == B){
				ans = i;
				break;
			}
			
		}
		System.out.println(ans);

		sc.close();

	}
} import java.util.ArrayDeque; ArrayDeque java.util import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.HashMap; HashMap java.util import java.util.HashSet; HashSet java.util import java.util.LinkedList; LinkedList java.util import java.util.List; List java.util import java.util.Map; Map java.util import java.util.Queue; Queue java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args){

		solve_abc158_c();
	}
  
  	public static void solve_abc158_c(){

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int ans = -1;
		
		for(int i=1;i<=1250;i++){
			
			int c = (int)Math.floor(i * 0.08);
			int d = (int)Math.floor(i * 0.1);
			
			if(c == A && d == B){
				ans = i;
				break;
			}
			
		}
		System.out.println(ans);

		sc.close();

	}
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args){

		solve_abc158_c();
	} main {

		solve_abc158_c();
	} solve_abc158_c() solve_abc158_c String[] args args public static void solve_abc158_c(){

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int ans = -1;
		
		for(int i=1;i<=1250;i++){
			
			int c = (int)Math.floor(i * 0.08);
			int d = (int)Math.floor(i * 0.1);
			
			if(c == A && d == B){
				ans = i;
				break;
			}
			
		}
		System.out.println(ans);

		sc.close();

	} solve_abc158_c {

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int ans = -1;
		
		for(int i=1;i<=1250;i++){
			
			int c = (int)Math.floor(i * 0.08);
			int d = (int)Math.floor(i * 0.1);
			
			if(c == A && d == B){
				ans = i;
				break;
			}
			
		}
		System.out.println(ans);

		sc.close();

	} 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 ans = -1; ans -1 1 for(int i=1;i<=1250;i++){
			
			int c = (int)Math.floor(i * 0.08);
			int d = (int)Math.floor(i * 0.1);
			
			if(c == A && d == B){
				ans = i;
				break;
			}
			
		} int i=1; int i=1; i 1 i<=1250 i 1250 i++ i++ i {
			
			int c = (int)Math.floor(i * 0.08);
			int d = (int)Math.floor(i * 0.1);
			
			if(c == A && d == B){
				ans = i;
				break;
			}
			
		} {
			
			int c = (int)Math.floor(i * 0.08);
			int d = (int)Math.floor(i * 0.1);
			
			if(c == A && d == B){
				ans = i;
				break;
			}
			
		} int c = (int)Math.floor(i * 0.08); c (int)Math.floor(i * 0.08) Math.floor Math i * 0.08 i 0.08 int d = (int)Math.floor(i * 0.1); d (int)Math.floor(i * 0.1) Math.floor Math i * 0.1 i 0.1 if(c == A && d == B){
				ans = i;
				break;
			} c == A && d == B c == A c A d == B d B {
				ans = i;
				break;
			} ans = i ans i break; System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args){

		solve_abc158_c();
	}
  
  	public static void solve_abc158_c(){

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int ans = -1;
		
		for(int i=1;i<=1250;i++){
			
			int c = (int)Math.floor(i * 0.08);
			int d = (int)Math.floor(i * 0.1);
			
			if(c == A && d == B){
				ans = i;
				break;
			}
			
		}
		System.out.println(ans);

		sc.close();

	}
} public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args){

		solve_abc158_c();
	}
  
  	public static void solve_abc158_c(){

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int ans = -1;
		
		for(int i=1;i<=1250;i++){
			
			int c = (int)Math.floor(i * 0.08);
			int d = (int)Math.floor(i * 0.1);
			
			if(c == A && d == B){
				ans = i;
				break;
			}
			
		}
		System.out.println(ans);

		sc.close();

	}
} Main
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;

public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args){

		solve_abc158_c();
	}
  
  	public static void solve_abc158_c(){

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int ans = -1;
		
		for(int i=1;i<=1250;i++){
			
			int c = (int)Math.floor(i * 0.08);
			int d = (int)Math.floor(i * 0.1);
			
			if(c == A && d == B){
				ans = i;
				break;
			}
			
		}
		System.out.println(ans);

		sc.close();

	}
}