A special form of a modulus and a modified Barrett reduction method are used to perform modular arithmetic in a cryptographic system. When a length of a heating resistor element in a direction in which ink is to be supplied is defined by L, the center of an ejection port is shifted, at a distance equal to or longer than L7 toward a location of an ink supply port, from the center of the heating resistor element, viewed in a direction in which ink is to be ejected. A catalytic converter unit is connected to the first exhaust pipe.