import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int i=0;
    int ans = 0;
    int ans2 =0;
    for (i = 0; i < 1100; i++) {
    	ans = (int)(i*0.08);
    	ans2=(int)(i*0.10);
    	if (ans ==a && ans2 == b) {
    		break;
    	}
    }
    if (i >=1100){
    	ans=-1;
    } else{
    	ans=i;
    }
    System.out.println(ans);
  }
}



 import java.util.*; util.* 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 i=0;
    int ans = 0;
    int ans2 =0;
    for (i = 0; i < 1100; i++) {
    	ans = (int)(i*0.08);
    	ans2=(int)(i*0.10);
    	if (ans ==a && ans2 == b) {
    		break;
    	}
    }
    if (i >=1100){
    	ans=-1;
    } else{
    	ans=i;
    }
    System.out.println(ans);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int i=0;
    int ans = 0;
    int ans2 =0;
    for (i = 0; i < 1100; i++) {
    	ans = (int)(i*0.08);
    	ans2=(int)(i*0.10);
    	if (ans ==a && ans2 == b) {
    		break;
    	}
    }
    if (i >=1100){
    	ans=-1;
    } else{
    	ans=i;
    }
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int i=0;
    int ans = 0;
    int ans2 =0;
    for (i = 0; i < 1100; i++) {
    	ans = (int)(i*0.08);
    	ans2=(int)(i*0.10);
    	if (ans ==a && ans2 == b) {
    		break;
    	}
    }
    if (i >=1100){
    	ans=-1;
    } else{
    	ans=i;
    }
    System.out.println(ans);
  } 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 i=0; i 0 int ans = 0; ans 0 int ans2 =0; ans2 0 for (i = 0; i < 1100; i++) {
    	ans = (int)(i*0.08);
    	ans2=(int)(i*0.10);
    	if (ans ==a && ans2 == b) {
    		break;
    	}
    } i = 0; i = 0 i 0 i < 1100 i 1100 i++ i++ i {
    	ans = (int)(i*0.08);
    	ans2=(int)(i*0.10);
    	if (ans ==a && ans2 == b) {
    		break;
    	}
    } {
    	ans = (int)(i*0.08);
    	ans2=(int)(i*0.10);
    	if (ans ==a && ans2 == b) {
    		break;
    	}
    } ans = (int)(i*0.08) ans (int)(i*0.08) i 0.08 ans2=(int)(i*0.10) ans2 (int)(i*0.10) i 0.10 if (ans ==a && ans2 == b) {
    		break;
    	} ans ==a && ans2 == b ans ==a ans a ans2 == b ans2 b {
    		break;
    	} break; if (i >=1100){
    	ans=-1;
    } else{
    	ans=i;
    } i >=1100 i 1100 {
    	ans=-1;
    } ans=-1 ans -1 1 {
    	ans=i;
    } ans=i ans i System.out.println(ans) System.out.println System.out System System.out ans 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 i=0;
    int ans = 0;
    int ans2 =0;
    for (i = 0; i < 1100; i++) {
    	ans = (int)(i*0.08);
    	ans2=(int)(i*0.10);
    	if (ans ==a && ans2 == b) {
    		break;
    	}
    }
    if (i >=1100){
    	ans=-1;
    } else{
    	ans=i;
    }
    System.out.println(ans);
  }
} public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int i=0;
    int ans = 0;
    int ans2 =0;
    for (i = 0; i < 1100; i++) {
    	ans = (int)(i*0.08);
    	ans2=(int)(i*0.10);
    	if (ans ==a && ans2 == b) {
    		break;
    	}
    }
    if (i >=1100){
    	ans=-1;
    } else{
    	ans=i;
    }
    System.out.println(ans);
  }
} Main
import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int i=0;
    int ans = 0;
    int ans2 =0;
    for (i = 0; i < 1100; i++) {
    	ans = (int)(i*0.08);
    	ans2=(int)(i*0.10);
    	if (ans ==a && ans2 == b) {
    		break;
    	}
    }
    if (i >=1100){
    	ans=-1;
    } else{
    	ans=i;
    }
    System.out.println(ans);
  }
}




