#include <stdio.h>

int main()
{
    int a, b, c, d, e, f;
    freopen(".10.in","r",stdin);
    freopen(".10.out","w",stdout);
    scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f);
    if( a == e || b == f || (a-e)==(b-f) || (a+e)==(b+f) ) printf("1\n");
    else printf("2\n");
    if( c == e || d == f ) printf("1\n");
    else printf("2\n");
}
