I grew mine like that the first year, but last year the squashes romped and the corn struggled, and the squashes won, so this year I have planted them seperately. :-\
You can always re-route your squash plants using bamboos to direct the long trailing stems were you would prefer them.