Depends on the sexes of each. If that is not an issue then as long as they get used to each other & establish their own territory they should live together fine.
What is the size/age of the snakes - we are talking corn snakes ?
you could use the 18x18x18 tank but you would have to kit it out with some fake foliage & put a background behind the tank & maybe the sides to give the snakes a better sense of security. use a heat mat like this;
try aspen for substrate, a water dish, a few hides this is why I would say the 18x18x18 would be better to allow multiple hides.
A light is not needed but would make it easier for you to view the snake. A heat lamp is not needed. If you wanted you could fit a red night light with a guard for night viewing so you could switch the heatmat off & turn the red night light on.
you'll need one of these for the heamat (& red night light);