using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _0026
{
    class Program
    {
        const int _sheetWidth = 10;
        const int _sheetHeight = 10;
        static void Main(string[] args)
        {
            Coloring coloring = new Coloring();
            Calclation calclation = new Calclation();
            int[][] sheet = new int[_sheetWidth][];
            for (int i = 0; i < _sheetWidth; ++i)
            {
                sheet[i] = new int[_sheetHeight];
            }
            string droppingInfo = "";
            while ((droppingInfo = Console.ReadLine()) != null)
            {
                int[] order = droppingInfo.Split(',').Select(int.Parse).ToArray();
                coloring.DroppingInk(ref sheet, order);
            }
            Console.WriteLine(calclation.CountValueIs0In2D(sheet));
            Console.WriteLine(calclation.MaxIn2D(sheet));
        }
    }
    class Coloring
    {
        internal void DroppingInk(ref int[][] sheet, int[] order)
        {
            int x = order[0];
            int y = order[1];
            int size = order[2];
            if (size == 1)
            {
                InkSmall(ref sheet, x, y);
            }
            if (size == 2)
            {
                InkMidium(ref sheet, x, y);
            }
            if (size == 3)
            {
                InkBig(ref sheet, x, y);
            }
        }
        internal void InkBig(ref int[][] sheet, int x, int y)
        {
            InkMidium(ref sheet, x, y);
            if (x <= 1)
            {
                if (y <= 1)
                {
                    sheet[x][y + 2] += 1;
                    sheet[x + 2][y] += 1;
                }
                else if (y >= 8)
                {
                    sheet[x][y - 2] += 1;
                    sheet[x + 2][y] += 1;
                }
                else
                {
                    sheet[x][y - 2] += 1;
                    sheet[x][y + 2] += 1;
                    sheet[x + 2][y] += 1;
                }
            }
            else if (x >= 8)
            {
                if (y <= 1)
                {
                    sheet[x][y + 2] += 1;
                    sheet[x - 2][y] += 1;
                }
                else if (y >= 8)
                {
                    sheet[x][y - 2] += 1;
                    sheet[x - 2][y] += 1;
                }
                else
                {
                    sheet[x][y - 2] += 1;
                    sheet[x][y + 2] += 1;
                    sheet[x - 2][y] += 1;
                }
            }
            else if (y <= 1)
            {
                sheet[x][y + 2] += 1;
                sheet[x - 2][y] += 1;
                sheet[x + 2][y] += 1;
            }
            else if (y >= 8)
            {
                sheet[x][y - 2] += 1;
                sheet[x - 2][y] += 1;
                sheet[x + 2][y] += 1;
            }
            else
            {
                sheet[x][y - 2] += 1;
                sheet[x][y + 2] += 1;
                sheet[x - 2][y] += 1;
                sheet[x + 2][y] += 1;
            }
        }
        internal void InkMidium(ref int[][] sheet, int x, int y)
        {
            InkSmall(ref sheet, x, y);
            if (x == 0)
            {
                if (y == 0)
                {
                    sheet[x + 1][y + 1] += 1;
                }
                else if (y == 9)
                {
                    sheet[x + 1][y - 1] += 1;
                }
                else
                {
                    sheet[x + 1][y - 1] += 1;
                    sheet[x + 1][y + 1] += 1;
                }
            }
            else if (x == 9)
            {
                if (y == 0)
                {
                    sheet[x - 1][y + 1] += 1;
                }
                else if (y == 9)
                {
                    sheet[x + 1][y - 1] += 1;
                }
                else
                {
                    sheet[x - 1][y - 1] += 1;
                    sheet[x - 1][y + 1] += 1;
                }
            }
            else if (y == 0)
            {
                sheet[x - 1][y + 1] += 1;
                sheet[x + 1][y + 1] += 1;
            }
            else if (y == 9)
            {
                sheet[x - 1][y - 1] += 1;
                sheet[x + 1][y - 1] += 1;
            }
            else
            {
                sheet[x - 1][y - 1] += 1;
                sheet[x + 1][y - 1] += 1;
                sheet[x - 1][y + 1] += 1;
                sheet[x + 1][y + 1] += 1;
            }
        }
        internal void InkSmall(ref int[][] sheet, int x, int y)
        {
            if (x == 0)
            {
                if (y == 0)
                {
                    sheet[x][y + 1] += 1;
                    sheet[x][y] += 1;
                    sheet[x + 1][y] += 1;
                }
                else if (y == 9)
                {
                    sheet[x][y - 1] += 1;
                    sheet[x][y] += 1;
                    sheet[x + 1][y] += 1;
                }
                else
                {
                    sheet[x][y - 1] += 1;
                    sheet[x][y + 1] += 1;
                    sheet[x][y] += 1;
                    sheet[x + 1][y] += 1;
                }
            }
            else if (x == 9)
            {
                if (y == 0)
                {
                    sheet[x][y + 1] += 1;
                    sheet[x][y] += 1;
                    sheet[x - 1][y] += 1;
                }
                else if (y == 9)
                {
                    sheet[x][y - 1] += 1;
                    sheet[x][y] += 1;
                    sheet[x - 1][y] += 1;
                }
                else
                {
                    sheet[x][y - 1] += 1;
                    sheet[x][y + 1] += 1;
                    sheet[x][y] += 1;
                    sheet[x - 1][y] += 1;
                }
            }
            else if (y == 0)
            {
                sheet[x][y + 1] += 1;
                sheet[x][y] += 1;
                sheet[x - 1][y] += 1;
                sheet[x + 1][y] += 1;
            }
            else if (y == 9)
            {
                sheet[x][y - 1] += 1;
                sheet[x][y] += 1;
                sheet[x - 1][y] += 1;
                sheet[x + 1][y] += 1;
            }
            else
            {
                sheet[x][y - 1] += 1;
                sheet[x][y + 1] += 1;
                sheet[x][y] += 1;
                sheet[x - 1][y] += 1;
                sheet[x + 1][y] += 1;
            }
        }
    }
    class Calclation
    {
        internal int CountValueIs0In2D(int[][] sheet)
        {
            int zeroCounter = 0;
            for (int i = 0; i < sheet.Length; ++i)
            {
                for (int j = 0; j < sheet[i].Length; ++j)
                {
                    if (sheet[i][j] == 0)
                    {
                        ++zeroCounter;
                    }
                }
            }
            return zeroCounter;
        }
        internal int MaxIn2D(int[][] sheet)
        {
            int max = 0;
            for (int i = 0; i < sheet.Length; ++i)
            {
                for (int j = 0; j < sheet[i].Length; ++j)
                {
                    if (max < sheet[i][j])
                    {
                        max = sheet[i][j];
                    }
                }
            }
            return max;
        }
    }
}



Measured memory_bytes: 16364