Japan declares virus emergency three months before Olympics