induction m.
right;intros;inversion H0.
case (H m);intro.
left;exists m;split;try (auto with arith).
case IHm;intro.
elim s;intro n0;intro.
left;exists n0;split;[omega | tauto].
right;intros.
inversion H0;trivial.
apply n0;omega.
Qed.

(** forall n, either forall p, p<>1 /\ p<>n -> not(p | n) or there is p such that p<>1 and p<>n and p | n *)
Lemma divides_nat : forall (n:nat),{p:nat | (p<>1)/\(p<>n)/\(divides n p)}+{forall (p:nat),(p<>1)->(p<>n)->~(divides n p)}.
intros.