A pyramid has a rectangular base of dimensions 15 cm and w cm. Given that its height and volume are 18 cm and 826 cm3 respectively, find the value of w.