The Chern conjecture for affine manifolds