#import <Foundation/Foundation.h>
@interface NSMutableDictionary (Extension)
-(void)incrementIntegerValueForKey:(id)key; // key に対応する NSInteger の値を1増加させる。key がない場合は新規設置して 1 を設定する。
@end
@implementation NSMutableDictionary (Extension)
-(void)incrementIntegerValueForKey:(id)key
{
    id value = [self objectForKey: key];
    if (value) {
        [self setObject: @([value integerValue] + 1) forKey: key];
    } else {
        [self setObject: @1 forKey: key];
    }
}
@end
typedef long long INT;
int main(){
    @autoreleasepool {
        int N;
        scanf("%d", &N);
        INT x[50] = {0};
        INT y[50] = {0};
        for(int i=0;i<N;i++){
            scanf("%lld %lld",x+i,y+i);
        }
        NSMutableDictionary *dic = [NSMutableDictionary dictionary];
        for(int i=0;i<N;i++){
            for(int j=0;j<N;j++) {
                if (i==j) continue;
                INT X = x[j] - x[i];
                INT Y = y[j] - y[i];
                NSString *key = [NSString stringWithFormat:@"%lld %lld",X,Y];
                [dic incrementIntegerValueForKey:key];
            }
        }
        NSInteger max = -NSIntegerMax;
        for (id key in [dic keyEnumerator]) {
            max = MAX(max, [[dic valueForKey: key] integerValue]);
        }
        printf("%ld", N-max);
    }
}
