The rings of dimension two