Answer
(a) Yes
(b) Yes
Work Step by Step
(a) Yes, the temperature of the substance can increase. For example, if a gas in a thermally insulated cylinder in compressed, then the temperature rises.
(b) Yes, the temperature of a gas in a thermally insulated cylinder decreases, if it expands.