Few function generators under a few k$ will do square waves up to 50 MHz. In general you would be looking at dedicated pulse generators for this. For high-frequency sinewaves you'd use an RF signal or sweep generator. A function generator is kind of a jack of all trades, master of none. HP made some hybrid pulse/function generators (eg. 8111) that might come close to meeting that spec.