The present invention relates to a compound of the following formula (I) or a pharmaceutically acceptable salt thereof, being useful as a renin inhibitor. [wherein R 1a is halogen, etc.; R 1m is H, etc.; G 1 is -N(R 1b )-, etc.; G 2 is -CO-, etc.; G 3 is -C(R 1c )(R 1d )-, etc.; G 4 is oxygen, etc.; R 1b is optionally substituted C 1-6 alkyl, etc.; R 1c and R 1d are independently the same or different, H, etc.; R 3 is H, optionally substituted C 1-6 alkyl, etc.; R 3a , R 3b , R 3c and R 3d are independently the same or different, and a group: -A-B (said A is single bond, etc., and said B is H, etc.), etc.; and n is 1, etc.]