import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	static int scale;
	static int[][] math;
	static final int MATH_LENGTH = 10;

	static void init() {
		scale = 0;
		math = new int[10][10];
	}

	public static void main(String[] args) {
		//?????°????????????
		init();
		int x = 0, y = 0;

		//??\???????????????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		while (true) {
			String inputStr = null;
			try {
				inputStr = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (inputStr == null || inputStr.isEmpty()) {
				break;
			}
			//??\???????????????","??§??????
			String[] inputSplitStr = inputStr.split(",");
			x = Integer.valueOf(inputSplitStr[0]);
			y = Integer.valueOf(inputSplitStr[1]);
			scale = Integer.valueOf(inputSplitStr[2]);

			// ???????????´???????????????????¨????
			switch (scale) {
			case 1: //???????????´????°????
				setSmallInk(x, y);
				break;
			case 2: //???????????´?????????
				setMediumInk(x, y);
				break;
			case 3: //???????????´?????§???
				setLargeInk(x, y);
				break;
			}
		}
		//???????????¶????????????????????¨?????????????????????????????????
		int whiteNumber = 0;
		int mostNumber = 0;
		for (int i = 0; i < MATH_LENGTH; i++) {
			for (int j = 0; j < MATH_LENGTH; j++) {
				if (math[i][j] == 0) {
					whiteNumber++;
				}
				if (mostNumber < math[i][j]) {
					mostNumber = math[i][j];
				}
			}
		}
		System.out.println(whiteNumber);
		System.out.println(mostNumber);
	}

	private static void setSmallInk(int x, int y) {
		math[x][y]++;
		if (checkSetMinMath(x - 1)) {
			math[x - 1][y]++;
		}
		if (checkSetMinMath(y - 1)) {
			math[x][y - 1]++;
		}
		if (checkSetMaxMath(x + 1)) {
			math[x + 1][y]++;
		}
		if (checkSetMaxMath(y + 1)) {
			math[x][y + 1]++;
		}
	}

	private static void setMediumInk(int x, int y) {
		math[x][y]++;
		if (checkSetMinMath(x - 1)) {
			math[x - 1][y]++;
			if (checkSetMinMath(y - 1)) {
				math[x - 1][y - 1]++;
			}
			if (checkSetMaxMath(y + 1)) {
				math[x - 1][y + 1]++;
			}
		}
		if (checkSetMinMath(y - 1)) {
			math[x][y - 1]++;
		}
		if (checkSetMaxMath(y + 1)) {
			math[x][y + 1]++;
		}
		if (checkSetMaxMath(x + 1)) {
			math[x + 1][y]++;
			if (checkSetMinMath(y - 1)) {
				math[x + 1][y - 1]++;
			}
			if (checkSetMaxMath(y + 1)) {
				math[x + 1][y + 1]++;
			}
		}
	}

	private static void setLargeInk(int x, int y) {
		math[x][y]++;
		if (checkSetMinMath(x - 2)) {
			math[x - 2][y]++;
		}
		if (checkSetMaxMath(x + 2)) {
			math[x + 2][y]++;
		}
		if (checkSetMinMath(y - 2)) {
			math[x][y - 2]++;
		}
		if (checkSetMaxMath(y + 2)) {
			math[x][y + 2]++;
		}

		if (checkSetMinMath(x - 1)) {
			math[x - 1][y]++;
			if (checkSetMinMath(y - 1)) {
				math[x - 1][y - 1]++;
			}
			if (checkSetMaxMath(y + 1)) {
				math[x - 1][y + 1]++;
			}
		}
		if (checkSetMinMath(y - 1)) {
			math[x][y - 1]++;
		}
		if (checkSetMaxMath(y + 1)) {
			math[x][y + 1]++;
		}
		if (checkSetMaxMath(x + 1)) {
			math[x + 1][y]++;
			if (checkSetMinMath(y - 1)) {
				math[x + 1][y - 1]++;
			}
			if (checkSetMaxMath(y + 1)) {
				math[x + 1][y + 1]++;
			}
		}
	}

	/**
	 * [??????] ??\????????????????????????????????????
	 * 
	 * @return ???????????§????????°false, ????????\??????true???
	 */
	private static boolean checkSetMinMath(int input) {
		if (input < 0) {
			return false;
		}
		return true;
	}

	/**
	 * [??????] ??\??????????????????????????\?????????????????????
	 * 
	 * @return ?????????????????\?????§????????°false, ????????\??????true???
	 */
	private static boolean checkSetMaxMath(int input) {
		if (MATH_LENGTH <= input) {
			return false;
		}
		return true;
	}
}

Measured memory_bytes: 16900