"use strict";
    
const combineWithoutRepetitions = (comboOptions, comboLength) => {
  if (comboLength === 1) {
    return comboOptions.map(comboOption => [comboOption]);
  }

  // Init combinations array.
  const combos = [];

  // Eliminate characters one by one and concatenate them to
  // combinations of smaller lengths.
  comboOptions.forEach((currentOption, optionIndex) => {
    const smallerCombos = combineWithoutRepetitions(
      comboOptions.slice(optionIndex + 1),
      comboLength - 1
    );

    smallerCombos.forEach((smallerCombo) => {
      combos.push([currentOption].concat(smallerCombo));
    });
  });

  return combos;
}

const main = arg => {
    arg = arg.trim().split("\n");
    const N = parseInt(arg[0]);
    const xs = arg.slice(1, N + 1).map(n=>n.split(" ")[0]);
    const ys = arg.slice(1, N + 1).map(n=>n.split(" ")[1]);
    
    let lists1 = [];
    let lists2 = [];
    
    for(let i=1; i<N; i++) {
        lists1.push(xs[i] - xs[i-1]);
        lists2.push(ys[i] - ys[i-1]);
    }
    
    let set1 = new Set(lists1);
    let set2 = new Set(lists2);
    
    console.log(Math.max([...set1].length, [...set2].length));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));