// Arup Guha
// 10/17/2014
// Solution to 1994 UCF HS Contest Problem: Visual Acuity

import java.util.*;

public class acuity {

	// Map of what Fred sees.
	final public static char[] SEES = {'0','1','5','3',' ','2',' ',' ','8',' '};

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);

		while (stdin.hasNext()) {

			// Read number, account for negative.
			String n = stdin.next();
			boolean neg = n.charAt(0) == '-';

			// Easy case.
			if (notValid(n))
				System.out.println("Fred does not see a valid number.");

			// All valid characters.
			else {

				// Flip and output.
				String ans = flip(n);
				if ((!neg && ans.compareTo(n) <=0) || (neg && n.compareTo(ans) <=0))
					System.out.println("Fred sees "+ans+", which is not bigger than "+n+".");
				else
					System.out.println("Fred sees "+ans+", which is bigger than "+n+".");
			}
		}
	}

	// Return true if we find an invalid character, false otherwise.
	public static boolean notValid(String n) {
		for (int i=0; i<n.length(); i++) {
			if (n.charAt(i) == '-') continue;
			if (SEES[n.charAt(i)-'0'] == ' ') return true;
		}
		return false;
	}

	// Remap using the flip array, watch out for the negative sign.
	public static String flip(String n) {
		String ans = "";
		for (int i=0; i<n.length(); i++) {
			if (n.charAt(i) == '-') ans = ans + "-";
			else					ans = ans + SEES[n.charAt(i)-'0'];
		}
		return ans;
	}
}