/*package whatever //do not write package name here */

import java.io.*;
import java.util.*;
class Main {
	public static void main (String[] args) {
		Scanner input = new Scanner(System.in);
		
		int n = input.nextInt();
		int m = input.nextInt();
		
		boolean flag = false;
		for(int i=1;i<=10000000;i++)
		{
		    if((int)Math.floor(0.08*i)==n&&(int)Math.floor(0.1*i)==m){
		        System.out.println(i);
		        flag = true;
		        break;
		    }
		    else
		        flag = false;
		}
		if(!flag)
		    System.out.println(-1);
		
	}
} import java.io.*; io.* java import java.util.*; util.* java class Main {
	public static void main (String[] args) {
		Scanner input = new Scanner(System.in);
		
		int n = input.nextInt();
		int m = input.nextInt();
		
		boolean flag = false;
		for(int i=1;i<=10000000;i++)
		{
		    if((int)Math.floor(0.08*i)==n&&(int)Math.floor(0.1*i)==m){
		        System.out.println(i);
		        flag = true;
		        break;
		    }
		    else
		        flag = false;
		}
		if(!flag)
		    System.out.println(-1);
		
	}
} Main public static void main (String[] args) {
		Scanner input = new Scanner(System.in);
		
		int n = input.nextInt();
		int m = input.nextInt();
		
		boolean flag = false;
		for(int i=1;i<=10000000;i++)
		{
		    if((int)Math.floor(0.08*i)==n&&(int)Math.floor(0.1*i)==m){
		        System.out.println(i);
		        flag = true;
		        break;
		    }
		    else
		        flag = false;
		}
		if(!flag)
		    System.out.println(-1);
		
	} main {
		Scanner input = new Scanner(System.in);
		
		int n = input.nextInt();
		int m = input.nextInt();
		
		boolean flag = false;
		for(int i=1;i<=10000000;i++)
		{
		    if((int)Math.floor(0.08*i)==n&&(int)Math.floor(0.1*i)==m){
		        System.out.println(i);
		        flag = true;
		        break;
		    }
		    else
		        flag = false;
		}
		if(!flag)
		    System.out.println(-1);
		
	} Scanner input = new Scanner(System.in); input new Scanner(System.in) int n = input.nextInt(); n input.nextInt() input.nextInt input int m = input.nextInt(); m input.nextInt() input.nextInt input boolean flag = false; flag false for(int i=1;i<=10000000;i++)
		{
		    if((int)Math.floor(0.08*i)==n&&(int)Math.floor(0.1*i)==m){
		        System.out.println(i);
		        flag = true;
		        break;
		    }
		    else
		        flag = false;
		} int i=1; int i=1; i 1 i<=10000000 i 10000000 i++ i++ i {
		    if((int)Math.floor(0.08*i)==n&&(int)Math.floor(0.1*i)==m){
		        System.out.println(i);
		        flag = true;
		        break;
		    }
		    else
		        flag = false;
		} {
		    if((int)Math.floor(0.08*i)==n&&(int)Math.floor(0.1*i)==m){
		        System.out.println(i);
		        flag = true;
		        break;
		    }
		    else
		        flag = false;
		} if((int)Math.floor(0.08*i)==n&&(int)Math.floor(0.1*i)==m){
		        System.out.println(i);
		        flag = true;
		        break;
		    }
		    else
		        flag = false; (int)Math.floor(0.08*i)==n&&(int)Math.floor(0.1*i)==m (int)Math.floor(0.08*i)==n (int)Math.floor(0.08*i) Math.floor Math 0.08*i 0.08 i n (int)Math.floor(0.1*i)==m (int)Math.floor(0.1*i) Math.floor Math 0.1*i 0.1 i m {
		        System.out.println(i);
		        flag = true;
		        break;
		    } System.out.println(i) System.out.println System.out System System.out i flag = true flag true break; flag = false flag false if(!flag)
		    System.out.println(-1); !flag flag System.out.println(-1) System.out.println System.out System System.out -1 1 String[] args args
/*package whatever //do not write package name here */

import java.io.*;
import java.util.*;
class Main {
	public static void main (String[] args) {
		Scanner input = new Scanner(System.in);
		
		int n = input.nextInt();
		int m = input.nextInt();
		
		boolean flag = false;
		for(int i=1;i<=10000000;i++)
		{
		    if((int)Math.floor(0.08*i)==n&&(int)Math.floor(0.1*i)==m){
		        System.out.println(i);
		        flag = true;
		        break;
		    }
		    else
		        flag = false;
		}
		if(!flag)
		    System.out.println(-1);
		
	}
}