Spectral rigidity and invariant distributions on Anosov surfaces