: test-div ( n div -- ? ) 2dup swap sqrt > [ 2drop t ] [ 2dup rem 0 = [ 2drop f ] [ 1 + test-div ] if ] if ; : is-prime? ( n -- ? ) 2 test-div ;