import java.io.*;
import java.lang.*;

public class HexadecimalToBinaryAndLong{
  public static void main(String[] args) throws IOException{
	  BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
	  System.out.println("Enter the hexa value!");
	  String hex = bf.readLine();
	  int i = Integer.parseInt(hex);
	  String by = Integer.toBinaryString(i);
	  System.out.println("This is Binary: " + by);
	  long num = Long.parseLong(hex,16);
	  System.out.println("This is long:=" + num);
  }
} 