Saudi Arabia says two ballistic missiles were intercepted as they headed towards the capital, Riyadh.