
import java.io.*;
import java.math.BigInteger;
import java.util.*;
public class Main {
	static BufferedReader br;
	static int cin() throws Exception
	{
		return Integer.valueOf(br.readLine());
	}
	static int[] split() throws Exception
	{
		String[] cmd=br.readLine().split(" ");
		int[] ans=new int[cmd.length];
		for(int i=0;i<cmd.length;i++)
		{
			ans[i]=Integer.valueOf(cmd[i]);
		}
		return ans;
	}
	static long[] splitL() throws IOException
	{
		String[] cmd=br.readLine().split(" ");
		long[] ans=new long[cmd.length];
		for(int i=0;i<cmd.length;i++)
		{
			ans[i]=Long.valueOf(cmd[i]);
		}
		return ans;
	}
	public static void main(String[] args) throws Exception{
		// TODO Auto-generated method stub
		br=new BufferedReader(new InputStreamReader(System.in));
		int[]ar=split();
		int a=ar[0];
		int b=ar[1];
		boolean bool=true;
		for(int i=0;i<=1250;i++)
		{
			int x=(i*8)/100;
			int y=i/10;
			if(x==a && y==b)
			{
				bool=false;
				System.out.println(i);
				break;
			}
		}
		if(bool)
			System.out.println(-1);
	}
} import java.io.*; io.* java import java.math.BigInteger; BigInteger java.math import java.util.*; util.* java public class Main {
	static BufferedReader br;
	static int cin() throws Exception
	{
		return Integer.valueOf(br.readLine());
	}
	static int[] split() throws Exception
	{
		String[] cmd=br.readLine().split(" ");
		int[] ans=new int[cmd.length];
		for(int i=0;i<cmd.length;i++)
		{
			ans[i]=Integer.valueOf(cmd[i]);
		}
		return ans;
	}
	static long[] splitL() throws IOException
	{
		String[] cmd=br.readLine().split(" ");
		long[] ans=new long[cmd.length];
		for(int i=0;i<cmd.length;i++)
		{
			ans[i]=Long.valueOf(cmd[i]);
		}
		return ans;
	}
	public static void main(String[] args) throws Exception{
		// TODO Auto-generated method stub
		br=new BufferedReader(new InputStreamReader(System.in));
		int[]ar=split();
		int a=ar[0];
		int b=ar[1];
		boolean bool=true;
		for(int i=0;i<=1250;i++)
		{
			int x=(i*8)/100;
			int y=i/10;
			if(x==a && y==b)
			{
				bool=false;
				System.out.println(i);
				break;
			}
		}
		if(bool)
			System.out.println(-1);
	}
} Main static BufferedReader br; br static int cin() throws Exception
	{
		return Integer.valueOf(br.readLine());
	} cin {
		return Integer.valueOf(br.readLine());
	} return Integer.valueOf(br.readLine()); Integer.valueOf(br.readLine()) Integer.valueOf Integer br.readLine() br.readLine br static int[] split() throws Exception
	{
		String[] cmd=br.readLine().split(" ");
		int[] ans=new int[cmd.length];
		for(int i=0;i<cmd.length;i++)
		{
			ans[i]=Integer.valueOf(cmd[i]);
		}
		return ans;
	} split {
		String[] cmd=br.readLine().split(" ");
		int[] ans=new int[cmd.length];
		for(int i=0;i<cmd.length;i++)
		{
			ans[i]=Integer.valueOf(cmd[i]);
		}
		return ans;
	} String[] cmd=br.readLine().split(" "); cmd br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int[] ans=new int[cmd.length]; ans new int[cmd.length] cmd.length cmd cmd.length for(int i=0;i<cmd.length;i++)
		{
			ans[i]=Integer.valueOf(cmd[i]);
		} int i=0; int i=0; i 0 i<cmd.length i cmd.length cmd cmd.length i++ i++ i {
			ans[i]=Integer.valueOf(cmd[i]);
		} {
			ans[i]=Integer.valueOf(cmd[i]);
		} ans[i]=Integer.valueOf(cmd[i]) ans[i] ans i Integer.valueOf(cmd[i]) Integer.valueOf Integer cmd[i] cmd i return ans; ans static long[] splitL() throws IOException
	{
		String[] cmd=br.readLine().split(" ");
		long[] ans=new long[cmd.length];
		for(int i=0;i<cmd.length;i++)
		{
			ans[i]=Long.valueOf(cmd[i]);
		}
		return ans;
	} splitL {
		String[] cmd=br.readLine().split(" ");
		long[] ans=new long[cmd.length];
		for(int i=0;i<cmd.length;i++)
		{
			ans[i]=Long.valueOf(cmd[i]);
		}
		return ans;
	} String[] cmd=br.readLine().split(" "); cmd br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " long[] ans=new long[cmd.length]; ans new long[cmd.length] cmd.length cmd cmd.length for(int i=0;i<cmd.length;i++)
		{
			ans[i]=Long.valueOf(cmd[i]);
		} int i=0; int i=0; i 0 i<cmd.length i cmd.length cmd cmd.length i++ i++ i {
			ans[i]=Long.valueOf(cmd[i]);
		} {
			ans[i]=Long.valueOf(cmd[i]);
		} ans[i]=Long.valueOf(cmd[i]) ans[i] ans i Long.valueOf(cmd[i]) Long.valueOf Long cmd[i] cmd i return ans; ans public static void main(String[] args) throws Exception{
		// TODO Auto-generated method stub
		br=new BufferedReader(new InputStreamReader(System.in));
		int[]ar=split();
		int a=ar[0];
		int b=ar[1];
		boolean bool=true;
		for(int i=0;i<=1250;i++)
		{
			int x=(i*8)/100;
			int y=i/10;
			if(x==a && y==b)
			{
				bool=false;
				System.out.println(i);
				break;
			}
		}
		if(bool)
			System.out.println(-1);
	} main {
		// TODO Auto-generated method stub
		br=new BufferedReader(new InputStreamReader(System.in));
		int[]ar=split();
		int a=ar[0];
		int b=ar[1];
		boolean bool=true;
		for(int i=0;i<=1250;i++)
		{
			int x=(i*8)/100;
			int y=i/10;
			if(x==a && y==b)
			{
				bool=false;
				System.out.println(i);
				break;
			}
		}
		if(bool)
			System.out.println(-1);
	} br=new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) int[]ar=split(); ar split() split int a=ar[0]; a ar[0] ar 0 int b=ar[1]; b ar[1] ar 1 boolean bool=true; bool true for(int i=0;i<=1250;i++)
		{
			int x=(i*8)/100;
			int y=i/10;
			if(x==a && y==b)
			{
				bool=false;
				System.out.println(i);
				break;
			}
		} int i=0; int i=0; i 0 i<=1250 i 1250 i++ i++ i {
			int x=(i*8)/100;
			int y=i/10;
			if(x==a && y==b)
			{
				bool=false;
				System.out.println(i);
				break;
			}
		} {
			int x=(i*8)/100;
			int y=i/10;
			if(x==a && y==b)
			{
				bool=false;
				System.out.println(i);
				break;
			}
		} int x=(i*8)/100; x (i*8)/100 (i*8) i 8 100 int y=i/10; y i/10 i 10 if(x==a && y==b)
			{
				bool=false;
				System.out.println(i);
				break;
			} x==a && y==b x==a x a y==b y b {
				bool=false;
				System.out.println(i);
				break;
			} bool=false bool false System.out.println(i) System.out.println System.out System System.out i break; if(bool)
			System.out.println(-1); bool System.out.println(-1) System.out.println System.out System System.out -1 1 String[] args args public class Main {
	static BufferedReader br;
	static int cin() throws Exception
	{
		return Integer.valueOf(br.readLine());
	}
	static int[] split() throws Exception
	{
		String[] cmd=br.readLine().split(" ");
		int[] ans=new int[cmd.length];
		for(int i=0;i<cmd.length;i++)
		{
			ans[i]=Integer.valueOf(cmd[i]);
		}
		return ans;
	}
	static long[] splitL() throws IOException
	{
		String[] cmd=br.readLine().split(" ");
		long[] ans=new long[cmd.length];
		for(int i=0;i<cmd.length;i++)
		{
			ans[i]=Long.valueOf(cmd[i]);
		}
		return ans;
	}
	public static void main(String[] args) throws Exception{
		// TODO Auto-generated method stub
		br=new BufferedReader(new InputStreamReader(System.in));
		int[]ar=split();
		int a=ar[0];
		int b=ar[1];
		boolean bool=true;
		for(int i=0;i<=1250;i++)
		{
			int x=(i*8)/100;
			int y=i/10;
			if(x==a && y==b)
			{
				bool=false;
				System.out.println(i);
				break;
			}
		}
		if(bool)
			System.out.println(-1);
	}
} public class Main {
	static BufferedReader br;
	static int cin() throws Exception
	{
		return Integer.valueOf(br.readLine());
	}
	static int[] split() throws Exception
	{
		String[] cmd=br.readLine().split(" ");
		int[] ans=new int[cmd.length];
		for(int i=0;i<cmd.length;i++)
		{
			ans[i]=Integer.valueOf(cmd[i]);
		}
		return ans;
	}
	static long[] splitL() throws IOException
	{
		String[] cmd=br.readLine().split(" ");
		long[] ans=new long[cmd.length];
		for(int i=0;i<cmd.length;i++)
		{
			ans[i]=Long.valueOf(cmd[i]);
		}
		return ans;
	}
	public static void main(String[] args) throws Exception{
		// TODO Auto-generated method stub
		br=new BufferedReader(new InputStreamReader(System.in));
		int[]ar=split();
		int a=ar[0];
		int b=ar[1];
		boolean bool=true;
		for(int i=0;i<=1250;i++)
		{
			int x=(i*8)/100;
			int y=i/10;
			if(x==a && y==b)
			{
				bool=false;
				System.out.println(i);
				break;
			}
		}
		if(bool)
			System.out.println(-1);
	}
} Main

import java.io.*;
import java.math.BigInteger;
import java.util.*;
public class Main {
	static BufferedReader br;
	static int cin() throws Exception
	{
		return Integer.valueOf(br.readLine());
	}
	static int[] split() throws Exception
	{
		String[] cmd=br.readLine().split(" ");
		int[] ans=new int[cmd.length];
		for(int i=0;i<cmd.length;i++)
		{
			ans[i]=Integer.valueOf(cmd[i]);
		}
		return ans;
	}
	static long[] splitL() throws IOException
	{
		String[] cmd=br.readLine().split(" ");
		long[] ans=new long[cmd.length];
		for(int i=0;i<cmd.length;i++)
		{
			ans[i]=Long.valueOf(cmd[i]);
		}
		return ans;
	}
	public static void main(String[] args) throws Exception{
		// TODO Auto-generated method stub
		br=new BufferedReader(new InputStreamReader(System.in));
		int[]ar=split();
		int a=ar[0];
		int b=ar[1];
		boolean bool=true;
		for(int i=0;i<=1250;i++)
		{
			int x=(i*8)/100;
			int y=i/10;
			if(x==a && y==b)
			{
				bool=false;
				System.out.println(i);
				break;
			}
		}
		if(bool)
			System.out.println(-1);
	}
}
