import java.io.*;
import java.util.*;
import java.math.*;
     
public class Main{
	public static void main(String[] args) throws Exception {
	IO io = new IO();
	PrintWriter out = new PrintWriter(System.out);
	Solver sr = new Solver();
	sr.solve(io,out);
	out.flush();
	out.close();
    	}

	static class Solver
	{
	    void solve(IO io, PrintWriter out)
	    {
          int x = io.nextInt();
          int y = io.nextInt();
          int min=-1;
          for(int i=1 ; i<=1250 ; i++)
          {
            int tmp = (int)Math.floor((i*8)/100);
            int tmp1 = (int)Math.floor(i/10);
            if(tmp==x && tmp1==y){
              min=i;
              break;
            }
          }
          out.print(min);
	    }
    	
	}
	//Special thanks to Petr (on codeforces) who inspired me to implement IO class!
	static class IO
	{
    	BufferedReader reader;
        StringTokenizer tokenizer;
    	public IO() {
                reader = new BufferedReader(new InputStreamReader(System.in));
                tokenizer = null;
            }
     
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        public String nextLine() {
            String s="";
            try {
                    s=reader.readLine();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            return s;
        }
        public int nextInt() {
            return Integer.parseInt(next());
        }
    
        public long nextLong() {
            return Long.parseLong(next());
        }
    	double nextDouble()
    	{
    		return Double.parseDouble(next());
    	}
	}
} import java.io.*; io.* java import java.util.*; util.* java import java.math.*; math.* java public class Main{
	public static void main(String[] args) throws Exception {
	IO io = new IO();
	PrintWriter out = new PrintWriter(System.out);
	Solver sr = new Solver();
	sr.solve(io,out);
	out.flush();
	out.close();
    	}

	static class Solver
	{
	    void solve(IO io, PrintWriter out)
	    {
          int x = io.nextInt();
          int y = io.nextInt();
          int min=-1;
          for(int i=1 ; i<=1250 ; i++)
          {
            int tmp = (int)Math.floor((i*8)/100);
            int tmp1 = (int)Math.floor(i/10);
            if(tmp==x && tmp1==y){
              min=i;
              break;
            }
          }
          out.print(min);
	    }
    	
	}
	//Special thanks to Petr (on codeforces) who inspired me to implement IO class!
	static class IO
	{
    	BufferedReader reader;
        StringTokenizer tokenizer;
    	public IO() {
                reader = new BufferedReader(new InputStreamReader(System.in));
                tokenizer = null;
            }
     
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        public String nextLine() {
            String s="";
            try {
                    s=reader.readLine();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            return s;
        }
        public int nextInt() {
            return Integer.parseInt(next());
        }
    
        public long nextLong() {
            return Long.parseLong(next());
        }
    	double nextDouble()
    	{
    		return Double.parseDouble(next());
    	}
	}
} Main public static void main(String[] args) throws Exception {
	IO io = new IO();
	PrintWriter out = new PrintWriter(System.out);
	Solver sr = new Solver();
	sr.solve(io,out);
	out.flush();
	out.close();
    	} main {
	IO io = new IO();
	PrintWriter out = new PrintWriter(System.out);
	Solver sr = new Solver();
	sr.solve(io,out);
	out.flush();
	out.close();
    	} IO io = new IO(); io new IO() PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) Solver sr = new Solver(); sr new Solver() sr.solve(io,out) sr.solve sr io out out.flush() out.flush out out.close() out.close out String[] args args static class Solver
	{
	    void solve(IO io, PrintWriter out)
	    {
          int x = io.nextInt();
          int y = io.nextInt();
          int min=-1;
          for(int i=1 ; i<=1250 ; i++)
          {
            int tmp = (int)Math.floor((i*8)/100);
            int tmp1 = (int)Math.floor(i/10);
            if(tmp==x && tmp1==y){
              min=i;
              break;
            }
          }
          out.print(min);
	    }
    	
	} Solver void solve(IO io, PrintWriter out)
	    {
          int x = io.nextInt();
          int y = io.nextInt();
          int min=-1;
          for(int i=1 ; i<=1250 ; i++)
          {
            int tmp = (int)Math.floor((i*8)/100);
            int tmp1 = (int)Math.floor(i/10);
            if(tmp==x && tmp1==y){
              min=i;
              break;
            }
          }
          out.print(min);
	    } solve {
          int x = io.nextInt();
          int y = io.nextInt();
          int min=-1;
          for(int i=1 ; i<=1250 ; i++)
          {
            int tmp = (int)Math.floor((i*8)/100);
            int tmp1 = (int)Math.floor(i/10);
            if(tmp==x && tmp1==y){
              min=i;
              break;
            }
          }
          out.print(min);
	    } int x = io.nextInt(); x io.nextInt() io.nextInt io int y = io.nextInt(); y io.nextInt() io.nextInt io int min=-1; min -1 1 for(int i=1 ; i<=1250 ; i++)
          {
            int tmp = (int)Math.floor((i*8)/100);
            int tmp1 = (int)Math.floor(i/10);
            if(tmp==x && tmp1==y){
              min=i;
              break;
            }
          } int i=1 ; int i=1 ; i 1 i<=1250 i 1250 i++ i++ i {
            int tmp = (int)Math.floor((i*8)/100);
            int tmp1 = (int)Math.floor(i/10);
            if(tmp==x && tmp1==y){
              min=i;
              break;
            }
          } {
            int tmp = (int)Math.floor((i*8)/100);
            int tmp1 = (int)Math.floor(i/10);
            if(tmp==x && tmp1==y){
              min=i;
              break;
            }
          } int tmp = (int)Math.floor((i*8)/100); tmp (int)Math.floor((i*8)/100) Math.floor Math (i*8)/100 (i*8) i 8 100 int tmp1 = (int)Math.floor(i/10); tmp1 (int)Math.floor(i/10) Math.floor Math i/10 i 10 if(tmp==x && tmp1==y){
              min=i;
              break;
            } tmp==x && tmp1==y tmp==x tmp x tmp1==y tmp1 y {
              min=i;
              break;
            } min=i min i break; out.print(min) out.print out min IO io io PrintWriter out out static class IO
	{
    	BufferedReader reader;
        StringTokenizer tokenizer;
    	public IO() {
                reader = new BufferedReader(new InputStreamReader(System.in));
                tokenizer = null;
            }
     
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        public String nextLine() {
            String s="";
            try {
                    s=reader.readLine();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            return s;
        }
        public int nextInt() {
            return Integer.parseInt(next());
        }
    
        public long nextLong() {
            return Long.parseLong(next());
        }
    	double nextDouble()
    	{
    		return Double.parseDouble(next());
    	}
	} IO BufferedReader reader; reader StringTokenizer tokenizer; tokenizer public IO() {
                reader = new BufferedReader(new InputStreamReader(System.in));
                tokenizer = null;
            } IO {
                reader = new BufferedReader(new InputStreamReader(System.in));
                tokenizer = null;
            } reader = new BufferedReader(new InputStreamReader(System.in)) reader new BufferedReader(new InputStreamReader(System.in)) tokenizer = null tokenizer null public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        } next {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        } while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            } tokenizer == null || !tokenizer.hasMoreTokens() tokenizer == null tokenizer null !tokenizer.hasMoreTokens() tokenizer.hasMoreTokens() tokenizer.hasMoreTokens tokenizer {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            } try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } IOException e {
                    throw new RuntimeException(e);
                } throw new RuntimeException(e); new RuntimeException(e) {
                    tokenizer = new StringTokenizer(reader.readLine());
                } tokenizer = new StringTokenizer(reader.readLine()) tokenizer new StringTokenizer(reader.readLine()) return tokenizer.nextToken(); tokenizer.nextToken() tokenizer.nextToken tokenizer public String nextLine() {
            String s="";
            try {
                    s=reader.readLine();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            return s;
        } nextLine {
            String s="";
            try {
                    s=reader.readLine();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            return s;
        } String s=""; s "" try {
                    s=reader.readLine();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } IOException e {
                    throw new RuntimeException(e);
                } throw new RuntimeException(e); new RuntimeException(e) {
                    s=reader.readLine();
                } s=reader.readLine() s reader.readLine() reader.readLine reader return s; s public int nextInt() {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public long nextLong() {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next double nextDouble()
    	{
    		return Double.parseDouble(next());
    	} nextDouble {
    		return Double.parseDouble(next());
    	} return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next public class Main{
	public static void main(String[] args) throws Exception {
	IO io = new IO();
	PrintWriter out = new PrintWriter(System.out);
	Solver sr = new Solver();
	sr.solve(io,out);
	out.flush();
	out.close();
    	}

	static class Solver
	{
	    void solve(IO io, PrintWriter out)
	    {
          int x = io.nextInt();
          int y = io.nextInt();
          int min=-1;
          for(int i=1 ; i<=1250 ; i++)
          {
            int tmp = (int)Math.floor((i*8)/100);
            int tmp1 = (int)Math.floor(i/10);
            if(tmp==x && tmp1==y){
              min=i;
              break;
            }
          }
          out.print(min);
	    }
    	
	}
	//Special thanks to Petr (on codeforces) who inspired me to implement IO class!
	static class IO
	{
    	BufferedReader reader;
        StringTokenizer tokenizer;
    	public IO() {
                reader = new BufferedReader(new InputStreamReader(System.in));
                tokenizer = null;
            }
     
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        public String nextLine() {
            String s="";
            try {
                    s=reader.readLine();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            return s;
        }
        public int nextInt() {
            return Integer.parseInt(next());
        }
    
        public long nextLong() {
            return Long.parseLong(next());
        }
    	double nextDouble()
    	{
    		return Double.parseDouble(next());
    	}
	}
} public class Main{
	public static void main(String[] args) throws Exception {
	IO io = new IO();
	PrintWriter out = new PrintWriter(System.out);
	Solver sr = new Solver();
	sr.solve(io,out);
	out.flush();
	out.close();
    	}

	static class Solver
	{
	    void solve(IO io, PrintWriter out)
	    {
          int x = io.nextInt();
          int y = io.nextInt();
          int min=-1;
          for(int i=1 ; i<=1250 ; i++)
          {
            int tmp = (int)Math.floor((i*8)/100);
            int tmp1 = (int)Math.floor(i/10);
            if(tmp==x && tmp1==y){
              min=i;
              break;
            }
          }
          out.print(min);
	    }
    	
	}
	//Special thanks to Petr (on codeforces) who inspired me to implement IO class!
	static class IO
	{
    	BufferedReader reader;
        StringTokenizer tokenizer;
    	public IO() {
                reader = new BufferedReader(new InputStreamReader(System.in));
                tokenizer = null;
            }
     
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        public String nextLine() {
            String s="";
            try {
                    s=reader.readLine();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            return s;
        }
        public int nextInt() {
            return Integer.parseInt(next());
        }
    
        public long nextLong() {
            return Long.parseLong(next());
        }
    	double nextDouble()
    	{
    		return Double.parseDouble(next());
    	}
	}
} Main
import java.io.*;
import java.util.*;
import java.math.*;
     
public class Main{
	public static void main(String[] args) throws Exception {
	IO io = new IO();
	PrintWriter out = new PrintWriter(System.out);
	Solver sr = new Solver();
	sr.solve(io,out);
	out.flush();
	out.close();
    	}

	static class Solver
	{
	    void solve(IO io, PrintWriter out)
	    {
          int x = io.nextInt();
          int y = io.nextInt();
          int min=-1;
          for(int i=1 ; i<=1250 ; i++)
          {
            int tmp = (int)Math.floor((i*8)/100);
            int tmp1 = (int)Math.floor(i/10);
            if(tmp==x && tmp1==y){
              min=i;
              break;
            }
          }
          out.print(min);
	    }
    	
	}
	//Special thanks to Petr (on codeforces) who inspired me to implement IO class!
	static class IO
	{
    	BufferedReader reader;
        StringTokenizer tokenizer;
    	public IO() {
                reader = new BufferedReader(new InputStreamReader(System.in));
                tokenizer = null;
            }
     
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        public String nextLine() {
            String s="";
            try {
                    s=reader.readLine();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            return s;
        }
        public int nextInt() {
            return Integer.parseInt(next());
        }
    
        public long nextLong() {
            return Long.parseLong(next());
        }
    	double nextDouble()
    	{
    		return Double.parseDouble(next());
    	}
	}
}