//pick定理:面积=内部整数点数+边上整数点数/2-1
// POJ 2954 #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <math.h>
using namespace std;
#define LL long long
typedef pair<int,int> pii;
const double inf = 0x3f3f3f3f;
const LL MOD =100000000LL;
const int N =;
#define clc(a,b) memset(a,b,sizeof(a))
const double eps = 1e-;
void fre() {freopen("in.txt","r",stdin);}
void freout() {freopen("out.txt","w",stdout);}
inline int read() {int x=,f=;char ch=getchar();while(ch>''||ch<'') {if(ch=='-') f=-; ch=getchar();}while(ch>=''&&ch<='') {x=x*+ch-'';ch=getchar();}return x*f;} int sgn(double x){
if(fabs(x) < eps)return ;
if(x < )return -;
else return ;
} struct Point{
int x,y;
Point(){}
Point(int _x,int _y){
x = _x;y = _y;
}
Point operator -(const Point &b)const{
return Point(x - b.x,y - b.y);
}
int operator ^(const Point &b)const{
return x*b.y - y*b.x;
}
int operator *(const Point &b)const{
return x*b.x + y*b.y;
}
friend bool operator<(const Point &a,const Point &b){
if(fabs(a.y-b.y)<eps) return a.x<b.x;
return a.y<b.y;
}
}; int area(Point a,Point b,Point c){
return fabs((a-c)^(b-c));
}
//求多边形边上整点的数目,顶点必须为整数点
int fun(Point a,Point b){
int x,y;
x=abs(a.x-b.x);
y=abs(a.y-b.y);
return __gcd(x,y);
}
int main(){
// fre();
int x1,y1,x2,y2,x3,y3;
while(~scanf("%d%d%d%d%d%d",&x1,&y1,&x2,&y2,&x3,&y3),x1||x2||x3||y1||y2||y3){
int ans=area(Point(x1,y1),Point(x2,y2),Point(x3,y3));
int cnt=;
Point a,b,c;
a=Point(x1,y1);
b=Point(x2,y2);
c=Point(x3,y3);
cnt+=fun(a,b);
cnt+=fun(a,c);
cnt+=fun(b,c);
printf("%d\n",(ans-cnt)/+);
}
return ;
}
04-29 22:18