In integer factorization we ask 'Given $N$ is there a $a\in[2,\sqrt{N}+1]$ such that $a|N$?'.
Is the above problem in coNP because we know primes is in $P$?
That is there is no such factor $a$ of $N$ iff $N$ is prime and we have AKS certificate.
So was it not known prior to 2004 that integer factoring was in coNP?