import java.util.*;	
import java.io.*;	
	
public class D{	
	// main(): application entry point 	
	public static void main(String[] args) {	
		// get filename 	
		Scanner stdin = new Scanner(System.in);	
		System.out.print("Filename: ");	
		String s = stdin.nextLine();	
	
		// set up file stream for processing 	
		Scanner fileIn = null;	
	
		try {	
			File file = new File(s);	
			fileIn = new Scanner(file);	
		}	
		catch (FileNotFoundException e) {	
			System.err.println(s + ": cannot be opened for reading");	
			System.exit(0);	
		}	
		catch (IOException e) {	
			System.err.println("File system error on "+ s);	
			System.exit(0);	
		}	
	
		// extract values and compute quotient 	
		try {	
			int numerator = fileIn.nextInt();	
			int denominator = fileIn.nextInt();	
	
			int quotient = numerator / denominator;	
			System.out.println();	
			System.out.println(numerator + " / " + denominator + " = "	
					+ quotient);	
		}	
		catch (InputMismatchException e) {	
			System.err.println(s + ": contains nonnumeric inputs");	
			System.exit(0);	
		}	
		catch (NoSuchElementException e) {	
			System.err.println(s + ": doesn't contain two inputs");	
			System.exit(0);	
		}	
		catch (ArithmeticException e) {	
			System.err.println(s + ": unexpected 0 input value");	
			System.exit(0);	
		}	
	
		return;	
	}	
}	
	
