import java.util.Scanner;
public class Main{
  public static void main(String args[]){
  	Scanner sc = new Scanner(System.in);
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    double d = a/0.08;
    int x = (int)(a/0.08);//a=x*0.08
    if(d!=x) x++;
    System.err.println(x);
      //消費税がa円である範囲(とりあえずxは範囲内)
    int min = a;
    int max = a;
    int xmin = x;
    int xmax = x;
    int i = 0;
    while(min==a){
      xmin--;
      min = (int)(xmin*0.08);
    }
    while(max==a){
      xmax++;
      max = (int)(xmax*0.08);
    }
    System.err.println("min:"+xmin+" max:"+xmax);
    //xmin<x<xmaxの間の数のうち最小のものが答
   	for(int j = xmin+1; j<xmax; j++){
      if(b==(int)(j*0.1)){
        System.out.println(j);
        return;
      }
    }
    System.out.println(-1);
  }
} import java.util.Scanner; Scanner java.util public class Main{
  public static void main(String args[]){
  	Scanner sc = new Scanner(System.in);
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    double d = a/0.08;
    int x = (int)(a/0.08);//a=x*0.08
    if(d!=x) x++;
    System.err.println(x);
      //消費税がa円である範囲(とりあえずxは範囲内)
    int min = a;
    int max = a;
    int xmin = x;
    int xmax = x;
    int i = 0;
    while(min==a){
      xmin--;
      min = (int)(xmin*0.08);
    }
    while(max==a){
      xmax++;
      max = (int)(xmax*0.08);
    }
    System.err.println("min:"+xmin+" max:"+xmax);
    //xmin<x<xmaxの間の数のうち最小のものが答
   	for(int j = xmin+1; j<xmax; j++){
      if(b==(int)(j*0.1)){
        System.out.println(j);
        return;
      }
    }
    System.out.println(-1);
  }
} Main public static void main(String args[]){
  	Scanner sc = new Scanner(System.in);
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    double d = a/0.08;
    int x = (int)(a/0.08);//a=x*0.08
    if(d!=x) x++;
    System.err.println(x);
      //消費税がa円である範囲(とりあえずxは範囲内)
    int min = a;
    int max = a;
    int xmin = x;
    int xmax = x;
    int i = 0;
    while(min==a){
      xmin--;
      min = (int)(xmin*0.08);
    }
    while(max==a){
      xmax++;
      max = (int)(xmax*0.08);
    }
    System.err.println("min:"+xmin+" max:"+xmax);
    //xmin<x<xmaxの間の数のうち最小のものが答
   	for(int j = xmin+1; j<xmax; j++){
      if(b==(int)(j*0.1)){
        System.out.println(j);
        return;
      }
    }
    System.out.println(-1);
  } main {
  	Scanner sc = new Scanner(System.in);
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    double d = a/0.08;
    int x = (int)(a/0.08);//a=x*0.08
    if(d!=x) x++;
    System.err.println(x);
      //消費税がa円である範囲(とりあえずxは範囲内)
    int min = a;
    int max = a;
    int xmin = x;
    int xmax = x;
    int i = 0;
    while(min==a){
      xmin--;
      min = (int)(xmin*0.08);
    }
    while(max==a){
      xmax++;
      max = (int)(xmax*0.08);
    }
    System.err.println("min:"+xmin+" max:"+xmax);
    //xmin<x<xmaxの間の数のうち最小のものが答
   	for(int j = xmin+1; j<xmax; j++){
      if(b==(int)(j*0.1)){
        System.out.println(j);
        return;
      }
    }
    System.out.println(-1);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc double d = a/0.08; d a/0.08 a 0.08 int x = (int)(a/0.08); x (int)(a/0.08) a 0.08 if(d!=x) x++; d!=x d x x++ x System.err.println(x) System.err.println System.err System System.err x int min = a; min a int max = a; max a int xmin = x; xmin x int xmax = x; xmax x int i = 0; i 0 while(min==a){
      xmin--;
      min = (int)(xmin*0.08);
    } min==a min a {
      xmin--;
      min = (int)(xmin*0.08);
    } xmin-- xmin min = (int)(xmin*0.08) min (int)(xmin*0.08) xmin 0.08 while(max==a){
      xmax++;
      max = (int)(xmax*0.08);
    } max==a max a {
      xmax++;
      max = (int)(xmax*0.08);
    } xmax++ xmax max = (int)(xmax*0.08) max (int)(xmax*0.08) xmax 0.08 System.err.println("min:"+xmin+" max:"+xmax) System.err.println System.err System System.err "min:"+xmin+" max:"+xmax " max:" "min:"+xmin+" max:"+xmax "min:" xmin " max:" xmax for(int j = xmin+1; j<xmax; j++){
      if(b==(int)(j*0.1)){
        System.out.println(j);
        return;
      }
    } int j = xmin+1; int j = xmin+1; j xmin+1 xmin 1 j<xmax j xmax j++ j++ j {
      if(b==(int)(j*0.1)){
        System.out.println(j);
        return;
      }
    } {
      if(b==(int)(j*0.1)){
        System.out.println(j);
        return;
      }
    } if(b==(int)(j*0.1)){
        System.out.println(j);
        return;
      } b==(int)(j*0.1) b (int)(j*0.1) j 0.1 {
        System.out.println(j);
        return;
      } System.out.println(j) System.out.println System.out System System.out j return; 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 = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    double d = a/0.08;
    int x = (int)(a/0.08);//a=x*0.08
    if(d!=x) x++;
    System.err.println(x);
      //消費税がa円である範囲(とりあえずxは範囲内)
    int min = a;
    int max = a;
    int xmin = x;
    int xmax = x;
    int i = 0;
    while(min==a){
      xmin--;
      min = (int)(xmin*0.08);
    }
    while(max==a){
      xmax++;
      max = (int)(xmax*0.08);
    }
    System.err.println("min:"+xmin+" max:"+xmax);
    //xmin<x<xmaxの間の数のうち最小のものが答
   	for(int j = xmin+1; j<xmax; j++){
      if(b==(int)(j*0.1)){
        System.out.println(j);
        return;
      }
    }
    System.out.println(-1);
  }
} public class Main{
  public static void main(String args[]){
  	Scanner sc = new Scanner(System.in);
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    double d = a/0.08;
    int x = (int)(a/0.08);//a=x*0.08
    if(d!=x) x++;
    System.err.println(x);
      //消費税がa円である範囲(とりあえずxは範囲内)
    int min = a;
    int max = a;
    int xmin = x;
    int xmax = x;
    int i = 0;
    while(min==a){
      xmin--;
      min = (int)(xmin*0.08);
    }
    while(max==a){
      xmax++;
      max = (int)(xmax*0.08);
    }
    System.err.println("min:"+xmin+" max:"+xmax);
    //xmin<x<xmaxの間の数のうち最小のものが答
   	for(int j = xmin+1; j<xmax; j++){
      if(b==(int)(j*0.1)){
        System.out.println(j);
        return;
      }
    }
    System.out.println(-1);
  }
} Main
import java.util.Scanner;
public class Main{
  public static void main(String args[]){
  	Scanner sc = new Scanner(System.in);
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    double d = a/0.08;
    int x = (int)(a/0.08);//a=x*0.08
    if(d!=x) x++;
    System.err.println(x);
      //消費税がa円である範囲(とりあえずxは範囲内)
    int min = a;
    int max = a;
    int xmin = x;
    int xmax = x;
    int i = 0;
    while(min==a){
      xmin--;
      min = (int)(xmin*0.08);
    }
    while(max==a){
      xmax++;
      max = (int)(xmax*0.08);
    }
    System.err.println("min:"+xmin+" max:"+xmax);
    //xmin<x<xmaxの間の数のうち最小のものが答
   	for(int j = xmin+1; j<xmax; j++){
      if(b==(int)(j*0.1)){
        System.out.println(j);
        return;
      }
    }
    System.out.println(-1);
  }
}