N is a positive integer. If you list the positive integers in rows of N such that the first row contains 1 to N, the second row contains N+1 to 2*N, and so on, then the first row with no prime is immediately followed by another row with no prime. What is N?