Yu-Shiba-Rusinov states in 2D superconductors with arbitrary Fermi contours