import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
	int a =  sc.nextInt();
	int b =  sc.nextInt();
    int x = -1;
    boolean flag = true;
	for(int i=0;i<10000;i++) {
		if(a==(8*i)/100&&b==(10*i)/100) {
			x = i;
			break;
		}
	}
    System.out.println(x) ;
  }
} import java.util.Scanner; Scanner java.util class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
	int a =  sc.nextInt();
	int b =  sc.nextInt();
    int x = -1;
    boolean flag = true;
	for(int i=0;i<10000;i++) {
		if(a==(8*i)/100&&b==(10*i)/100) {
			x = i;
			break;
		}
	}
    System.out.println(x) ;
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
	int a =  sc.nextInt();
	int b =  sc.nextInt();
    int x = -1;
    boolean flag = true;
	for(int i=0;i<10000;i++) {
		if(a==(8*i)/100&&b==(10*i)/100) {
			x = i;
			break;
		}
	}
    System.out.println(x) ;
  } main {
    Scanner sc = new Scanner(System.in);
	int a =  sc.nextInt();
	int b =  sc.nextInt();
    int x = -1;
    boolean flag = true;
	for(int i=0;i<10000;i++) {
		if(a==(8*i)/100&&b==(10*i)/100) {
			x = i;
			break;
		}
	}
    System.out.println(x) ;
  } 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 x = -1; x -1 1 boolean flag = true; flag true for(int i=0;i<10000;i++) {
		if(a==(8*i)/100&&b==(10*i)/100) {
			x = i;
			break;
		}
	} int i=0; int i=0; i 0 i<10000 i 10000 i++ i++ i {
		if(a==(8*i)/100&&b==(10*i)/100) {
			x = i;
			break;
		}
	} {
		if(a==(8*i)/100&&b==(10*i)/100) {
			x = i;
			break;
		}
	} if(a==(8*i)/100&&b==(10*i)/100) {
			x = i;
			break;
		} a==(8*i)/100&&b==(10*i)/100 a==(8*i)/100 a (8*i)/100 (8*i) 8 i 100 b==(10*i)/100 b (10*i)/100 (10*i) 10 i 100 {
			x = i;
			break;
		} x = i x i break; System.out.println(x) System.out.println System.out System System.out x String[] args args
import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
	int a =  sc.nextInt();
	int b =  sc.nextInt();
    int x = -1;
    boolean flag = true;
	for(int i=0;i<10000;i++) {
		if(a==(8*i)/100&&b==(10*i)/100) {
			x = i;
			break;
		}
	}
    System.out.println(x) ;
  }
}