They’re both phrases.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
In terms of grammar, both of those are noun phrases.
Noun phrases can function as the subject or object (complement) of a verb, as well be in other roles.