The artworks will be divided between the Tate and the National Gallery