import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
  
//(1,1),(2,2),(3,3)    3
//(0,0),(1,1),(1,-1)   2
public class Main {
    //坐标点类
    static class Point {
        int x;
        int y;
  
        Point(int x, int y) {
            this.x = x;
            this.y = y;
        }
    }
  
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        sc.close();
        //解析坐标
        String[] strs = str.split("\\),");
        List<Point> list = new ArrayList<Point>();
        for (int i = 0; i < strs.length; i++) {
            strs[i] = strs[i].substring(1);
            String[] ps = strs[i].split(",");
            int x = Integer.parseInt(ps[0]);
            if (i == strs.length - 1)
                ps[1] = ps[1].substring(0, ps[1].length() - 1);
            int y = Integer.parseInt(ps[1]);
            Point p = new Point(x, y);
            list.add(p);
        }
        System.out.println(cal(list));
    }
      
    //计算
    public static int cal(List<Point> list) {
        if (list.size() == 0)
            return 0;
        if (list.size() == 1)
            return 1;
        int res = 0;
        
        for (int i = 0; i < list.size(); i++) {
        	//在leetcode上亲测在循环外定义HashMap并在循环内调用map.clear()比直接
            //在循环内定义HashMap慢了2ms,内存少用了0.1m
            Map<String, Integer> map = new HashMap<String, Integer>();   
            Point cur = list.get(i);
            
            //共线数
            int g = 0;
            //共点数
            int gd = 1;
            //共x数
            int gx = 0;
            //共y数
            int gy = 0;
            //共斜率数
            int gk = 0;
  
            for (int j = 0; j < list.size(); j++) {
                if (i == j)
                    continue;
                Point temp = list.get(j);
                int x1 = cur.x - temp.x;
                int y1 = cur.y - temp.y;
                if (x1 == 0 && y1 == 0) {
                    gd++;
                    continue;
                }
                if (x1 == 0) {
                    gx++;
                    continue;
                }
                if (y1 == 0) {
                    gy++;
                    continue;
                }
                //由于直接算出double类型的斜率之后再进行比较会有误差
                //所以使用HashMap存储不同斜率值得数量
                int gc = gcd(x1, y1);
                x1 /= gc;
                y1 /= gc;
                String key = x1 + "/" + y1;
                if (!map.containsKey(key)) {
                    map.put(key, 0);
                }
                int curGk = map.get(key) + 1;
                map.put(key, curGk);
                gk = Math.max(gk, curGk);
            }
            g = Math.max(gx, gy);
            g = Math.max(g, gk);
            res = Math.max(res, g + gd);
        }
        return res;
    }
     
    //求x、y最大公约数
    public static int gcd(int x, int y) {
        return y == 0 ? x : gcd(y, x % y);
    }
  
}