countdown(X) :- 0 < X.
writef("%d", X) :- countdown(X).