A gas in a piston-cylinder device is compressed, and as a result its temperature rises. Is this a heat or work interaction?