Chaityas refer to the halls enclosing the stupas. Chaityas were probably constructed to hold large numbers of devotees for prayer. Viharas on the other hand are constructions built in ancient India in order to provide resting places for the wandering Buddhist monks