The present invention provides a low molecular compound that inhibits phosphatidylserine synthase 1 or a pharmaceutically acceptable salt thereof, a pharmaceutical containing thereof, and a therapeutic agent for cancer having a suppressed function of phosphatidylserine synthase 2. The compound represented by formula (1) or a pharmaceutically acceptable salt thereof, wherein R
1
, ring Q
1
, ring Q
2
, and W are as defined in the specification.