Planet formation theories predict the existence of free-floating planets that have been ejected from their parent systems. Although they emit little or no light, they can be detected during gravitational microlensing events. Microlensing events caused by rogue planets are characterized by very short timescales $t_{rm E}$ (typically below two days) and small angular Einstein radii $theta_{rm E}$ (up to several uas). Here we present the discovery and characterization of two ultra-short microlensing events identified in data from the Optical Gravitational Lensing Experiment (OGLE) survey, which may have been caused by free-floating or wide-orbit planets. OGLE-2012-BLG-1323 is one of the shortest events discovered thus far ($t_{rm E}$=0.155 +/- 0.005 d, $theta_{rm E}$=2.37 +/- 0.10 uas) and was caused by an Earth-mass object in the Galactic disk or a Neptune-mass planet in the Galactic bulge. OGLE-2017-BLG-0560 ($t_{rm E}$=0.905 +/- 0.005 d, $theta_{rm E}$=38.7 +/- 1.6 uas) was caused by a Jupiter-mass planet in the Galactic disk or a brown dwarf in the bulge. We rule out stellar companions up to a distance of 6.0 and 3.9 au, respectively. We suggest that the lensing objects, whether located on very wide orbits or free-floating, may originate from the same physical mechanism. Although the sample of ultrashort microlensing events is small, these detections are consistent with low-mass wide-orbit or unbound planets being more common than stars in the Milky Way.