Search for Axionlike and Scalar Particles with the NA64 Experiment.