#!/usr/bin/env python3 S = list() n = int(input()) for i in range(n): m = int(input()) cc = [list(map(int, input().split())) for i in range(m)] cc.sort() xx,yy = cc[0] cc = [(c[0]-xx, c[1]-yy) for c in cc] double = False for dd in S: if tuple(cc)==dd: double = True break if not double: S.append(tuple(cc)) print(len(S))