Do my letters of rec. have to be from professors I take classes with?

Hello, Guys

I am thinking about transferring to either Cornell or Columbia, and they both require rec. letters from “college professors”. However, the two professors I have in mind, and that know me enough to write rec. letters, I don’t have classes with.

One of them I a professor I have a project with, a small research project. I am currently a freshman, and he teaches more advance courses. I am thinking about transferring at the end of my Sophomore year, so I won’t have taken his classes yet.

The other professor is the advisor of my Formula SAE (Collegiate design competition), and he only teaches one class (for seniors), which I won’t have taken in time either.

Should I look for professors that I have actual classes with? Or are those two good enough?

Thank you!