import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;

public class Main{

	/** ?´??????????????????° **/
	public static int CELL_COUNT = 10 * 10;

	/** ?????????????????????????????????????????????????????? **/
	public static List<String> droppingInkList = new ArrayList<String>();

	public static void main(String[] args) {

		// ???????????????
		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);

		while (sc.hasNext()) {
			// ??\?????????????????????????????§??????
			String[] inputs = sc.next().split(",");
			int x = Integer.parseInt(inputs[0]);
			int y = Integer.parseInt(inputs[1]);
			int size = Integer.parseInt(inputs[2]);

			// ??´??????????????????????????????????????????
			droppingInkList.add(joinString(x, y));

			if (size == 1) {
				// ?°??????´?????´???
				addSmall(x, y);
			} else if (size == 2) {
				// ????????´?????´???
				addSmall(x, y);
				addMedium(x, y);
			} else if (size == 3) {
				// ??§?????´?????´???
				addSmall(x, y);
				addMedium(x, y);
				addLarge(x, y);
			}
		}
		// ??????????????????????????¨???????????????????????°
		System.out.println(String.valueOf(countWhiteCell(droppingInkList)));

		// ??????????????????????????????
		System.out.println(String
				.valueOf(countMostDroppingInk(droppingInkList)));
	}

	/**
	 * ??\????????????x_y????????¢?????????????????????????????????
	 *
	 * @param x
	 * @param y
	 * @return ?????????????????????
	 */
	public static String joinString(int x, int y) {
		StringBuilder result = new StringBuilder();
		result.append(x);
		result.append("_");
		result.append(y);
		return result.toString();
	}

	/**
	 * ??\?????????(x,y)???????????????????´???????????????§????????°????????????????????????
	 *
	 * @param x
	 * @param y
	 */
	public static void addSmall(int x, int y) {
		if (y != 0) {
			droppingInkList.add(joinString(x, y - 1));
		}
		if (y != 9) {
			droppingInkList.add(joinString(x, y + 1));
		}
		if (x != 0) {
			droppingInkList.add(joinString(x - 1, y));
		}
		if (x != 9) {
			droppingInkList.add(joinString(x + 1, y));
		}
	}

	/**
	 * ??\?????????(x,y)????????????????????????????????????????´???????????????§????????°????????????????????????
	 *
	 * @param x
	 * @param y
	 */
	public static void addMedium(int x, int y) {
		if (x != 0 && y != 0) {
			droppingInkList.add(joinString(x - 1, y - 1));
		}
		if (x != 0 && y != 9) {
			droppingInkList.add(joinString(x - 1, y + 1));
		}
		if (x != 9 && y != 0) {
			droppingInkList.add(joinString(x + 1, y - 1));
		}
		if (x != 9 && y != 9) {
			droppingInkList.add(joinString(x + 1, y + 1));
		}
	}

	/**
	 * ??\?????????(x,y)??????+1,???+1,???+1,???+1????´???????????????§????????°????????????????????????
	 *
	 * @param x
	 * @param y
	 */
	public static void addLarge(int x, int y) {
		if (y != 0 && y != 1) {
			droppingInkList.add(joinString(x, y - 2));
		}
		if (y != 8 && y != 9) {
			droppingInkList.add(joinString(x, y + 2));
		}
		if (x != 0 && x != 1) {
			droppingInkList.add(joinString(x - 2, y));
		}
		if (x != 8 && x != 9) {
			droppingInkList.add(joinString(x + 2, y));
		}
	}

	/**
	 * ??????????????????????????????????????°?????°????????????
	 *
	 * @param list
	 * @return ??????????????????????????????????????°
	 */
	public static int countWhiteCell(List<String> list) {
		HashSet<String> set = new HashSet<String>(list);
		// ?´???????????????????????????????????????????????????????????????????
		return CELL_COUNT - set.size();
	}

	/**
	 * ????????????????????????????????????????????????????????????????????????????????°????????°????????????
	 *
	 * @param list
	 * @return ??????????????????????????????
	 */
	public static int countMostDroppingInk(List<String> list) {
		Collections.sort(list);
		String beforeStr = "";

		// ??????????????????????????????
		int mostCount = 0;
		// ?????¨??°??????????????????????????????
		int count = 0;

		for (String str : list) {
			if (beforeStr.equals("")) {
				// ??????
				count++;
				beforeStr = str;
			} else if (!beforeStr.equals(str)) {
				// ????????????????????£?????¨???
				if (count > mostCount) {
					// ????????°??????????????°??????????????§?????°????????§????????´????????????????????????????????°?????´??°
					mostCount = count;
				}
				count = 1;
				beforeStr = str;
			} else {
				// ?????????????????????????????¨???
				count++;
			}
		}

		if (count > mostCount) {
			// ???????????°??????????????°??????????????§?????°????????§????????´????????????????????????????????°?????´??°
			mostCount = count;
		}

		return mostCount;
	}

}

Measured memory_bytes: 18220