R, 111
Probably a lot of room to improve this at the moment
i=scan();b=2:i;R=i%%b;I=rep(i,i-1);while(any(I<-I%/%b))R=cbind(I%%b,R);for(x in b)if(all(R[x-1,]<2))cat(x,'\n')
Runs with warnings
> i=scan();b=2:i;R=i%%b;I=rep(i,i-1);while(any(I<-I%/%b))R=cbind(I%%b,R);for(x in b)if(all(R[x-1,]<2))cat(x,'\n')1: 820002: Read 1 itemThere were 17 warnings (use warnings() to see them)2 3 4 5 81999 82000>