Add templates for problems 23 and 27