import java.util.*;
import java.lang.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int aa = 0;
		int bb = 0;
		for( int i=10; i<=1009; i++ ){
			if( i/10==B ){
				bb = i;
				break;
			}
		}
		for( int i=bb/10*10; i<=bb/10*10+9; i++  ){
			if( i*8/100==A ){
				System.out.println(i);
				break;
			}
			if( i==bb/10*10+9 ){
				System.out.println(-1);
			}
		}
	}
} import java.util.*; util.* java import java.lang.*; lang.* java public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int aa = 0;
		int bb = 0;
		for( int i=10; i<=1009; i++ ){
			if( i/10==B ){
				bb = i;
				break;
			}
		}
		for( int i=bb/10*10; i<=bb/10*10+9; i++  ){
			if( i*8/100==A ){
				System.out.println(i);
				break;
			}
			if( i==bb/10*10+9 ){
				System.out.println(-1);
			}
		}
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int aa = 0;
		int bb = 0;
		for( int i=10; i<=1009; i++ ){
			if( i/10==B ){
				bb = i;
				break;
			}
		}
		for( int i=bb/10*10; i<=bb/10*10+9; i++  ){
			if( i*8/100==A ){
				System.out.println(i);
				break;
			}
			if( i==bb/10*10+9 ){
				System.out.println(-1);
			}
		}
	} main {
		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int aa = 0;
		int bb = 0;
		for( int i=10; i<=1009; i++ ){
			if( i/10==B ){
				bb = i;
				break;
			}
		}
		for( int i=bb/10*10; i<=bb/10*10+9; i++  ){
			if( i*8/100==A ){
				System.out.println(i);
				break;
			}
			if( i==bb/10*10+9 ){
				System.out.println(-1);
			}
		}
	} 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 aa = 0; aa 0 int bb = 0; bb 0 for( int i=10; i<=1009; i++ ){
			if( i/10==B ){
				bb = i;
				break;
			}
		} int i=10; int i=10; i 10 i<=1009 i 1009 i++ i++ i {
			if( i/10==B ){
				bb = i;
				break;
			}
		} {
			if( i/10==B ){
				bb = i;
				break;
			}
		} if( i/10==B ){
				bb = i;
				break;
			} i/10==B i/10 i 10 B {
				bb = i;
				break;
			} bb = i bb i break; for( int i=bb/10*10; i<=bb/10*10+9; i++  ){
			if( i*8/100==A ){
				System.out.println(i);
				break;
			}
			if( i==bb/10*10+9 ){
				System.out.println(-1);
			}
		} int i=bb/10*10; int i=bb/10*10; i bb/10*10 bb/10 bb 10 10 i<=bb/10*10+9 i bb/10*10+9 bb/10*10 bb/10 bb 10 10 9 i++ i++ i {
			if( i*8/100==A ){
				System.out.println(i);
				break;
			}
			if( i==bb/10*10+9 ){
				System.out.println(-1);
			}
		} {
			if( i*8/100==A ){
				System.out.println(i);
				break;
			}
			if( i==bb/10*10+9 ){
				System.out.println(-1);
			}
		} if( i*8/100==A ){
				System.out.println(i);
				break;
			} i*8/100==A i*8/100 i*8 i 8 100 A {
				System.out.println(i);
				break;
			} System.out.println(i) System.out.println System.out System System.out i break; if( i==bb/10*10+9 ){
				System.out.println(-1);
			} i==bb/10*10+9 i bb/10*10+9 bb/10*10 bb/10 bb 10 10 9 {
				System.out.println(-1);
			} System.out.println(-1) System.out.println System.out System System.out -1 1 String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int aa = 0;
		int bb = 0;
		for( int i=10; i<=1009; i++ ){
			if( i/10==B ){
				bb = i;
				break;
			}
		}
		for( int i=bb/10*10; i<=bb/10*10+9; i++  ){
			if( i*8/100==A ){
				System.out.println(i);
				break;
			}
			if( i==bb/10*10+9 ){
				System.out.println(-1);
			}
		}
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int aa = 0;
		int bb = 0;
		for( int i=10; i<=1009; i++ ){
			if( i/10==B ){
				bb = i;
				break;
			}
		}
		for( int i=bb/10*10; i<=bb/10*10+9; i++  ){
			if( i*8/100==A ){
				System.out.println(i);
				break;
			}
			if( i==bb/10*10+9 ){
				System.out.println(-1);
			}
		}
	}
} Main
import java.util.*;
import java.lang.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int aa = 0;
		int bb = 0;
		for( int i=10; i<=1009; i++ ){
			if( i/10==B ){
				bb = i;
				break;
			}
		}
		for( int i=bb/10*10; i<=bb/10*10+9; i++  ){
			if( i*8/100==A ){
				System.out.println(i);
				break;
			}
			if( i==bb/10*10+9 ){
				System.out.println(-1);
			}
		}
	}
}
