James Webb Space Telescope will help Euclid spacecraft investigate dark energy and dark matter