This valve is provided with a first valve housing, a second valve housing, a diaphragm, a first affixation section, and a second affixation section. The diaphragm forms together with the first valve housing an upstream valve chamber, forms together with the second valve housing a downstream valve chamber, and can move between a first position at which the upstream valve chamber and the downstream valve chamber are disconnected, and a second position at which the upstream valve chamber and the downstream valve chamber are connected. At the second position, the diaphragm is in contact either with the inlet of a second discharge flow passage or with the wall surface of the downstream valve chamber to seal between the second discharge flow passage and a first discharge flow passage, and at the first position, the diaphragm allows the connection between the first discharge flow passage and the second discharge flow passage.