import java.io.*;

public class Consola {
  private static  BufferedReader _in;
  static {
    _in = new BufferedReader ( new InputStreamReader( System.in ) );
  }

  public static boolean readBoolean() {
    try {
    String linea = _in.readLine();
    if ( linea == null ) {
      return  false;
    }
    return Boolean.valueOf(linea).booleanValue();
    } catch (IOException e) {
      e.printStackTrace();
    }
    return false;
  }
  public static int readInt() {
    try {
    String linea = _in.readLine();
    if ( linea == null ) {
      return -1;
    }
    return Integer.parseInt(linea);
    } catch (IOException e) {
      e.printStackTrace();
    }
    return -1;
  }
  public static long readLong() {
    try {
    String linea = _in.readLine();
    if ( linea == null ) {
      return -1;
    }
    return Long.valueOf(linea).longValue();
    } catch (IOException e) {
      e.printStackTrace();
    }
    return -1;
  }
  public static float readFloat() {
    try {
    String linea = _in.readLine();
    if ( linea == null ) {
      return -1f;
    }
    return Float.valueOf(linea).floatValue();
    } catch (IOException e) {
      e.printStackTrace();
    }
    return -1f;
  }
  public static double readDouble() {
    try {
    String linea = _in.readLine();
    if ( linea == null ) {
      return -1;
    }
    return Double.valueOf(linea).doubleValue();
    } catch (IOException e) {
      e.printStackTrace();
    }
    return -1d;
  }
  public static String readLine() {
    try {
     return _in.readLine();
    } catch (IOException e) {
      e.printStackTrace();
    }
    return "";
  }

}
