Sparre-Andersen theorem with spatiotemporal correlations