A compound of formula: wherein R 1 is H, C 1 -C 10 alkyl, C 2 -C 10 alkenyl, C 2 -C 10 alkynyl, C 3 -C 20 cycloalkyl, C 3 -C 20 cycloalkenyl, C 3 -C 20 heterocycloalkyl, C 3 -C 20 heterocycloalkenyl, aryl, or heteroaryl; R 2 is H, C 1 -C 10 alkyl, C 3 -C 20 cycloalkyl, C 3 -C 20 heterocycloalkyl, aryl, or heteroaryl; or R 2, together with R 3 and the nitrogen atom to which they are attached, is C 3 -C 20 heterocycloalkyl, C 3 -C 20 heterocycloalkenyl, or heteroaryl; R 3 is C 3 -C 20 heterocycloalkyl, aryl, or heteroaryl; R 4 is H, C 1 -C 10 alkyl, C 3 -C 20 cycloalkyl, C 3 -C 20 cycloalkenyl, C 3 -C 20 heterocycloalkyl, C 3 -C 20 heterocycloalkenyl, aryl, heteroaryl, C R a, C OR a, C NR a R b, C(=NH)NR a R b, C(=N-CN)NR a R b, C(=N-NO 2)NR a R b, S R a, S(O 2)R a, S NR a R b, or S(O 2)NR a R b; R 5 is C NR a R b, C(=NH)NR a R b, C(=N-CN)NR a R b, C(=N-NO 2)NR a R b, S R a, S(O 2)R a, S NR a R b, or S(O 2)NR a R b; in which each of R a and R b, independently, is H, C 1 -C 10 alkyl, C 3 -C 20 cycloalkyl, C 3 -C 20 heterocycloalkyl, aryl, or heteroaryl; or R a, together with R b and the nitrogen atom to which they are attached, is C 3 -C 20 heterocycloalkyl, C 3 -C 20 heterocycloalkenyl, or heteroaryl; and X is in which R 7 is H, halo, trifluoromethyl, C 1 -C 10 alkyl, C 1 -C 10 alkoxy, nitro, cyano, amino, or hydroxy; and m is 0, 1, 2, 3, 4, or 5, wherein each of alkyl, alkenyl, alkynyl, cycloalkyl, cycloalkenyl, heterocycloalkyl, heterocycloalkenyl, aryl, and heteroaryl is optionally substituted with C 2 -C 10 alkenyl, C 2 -C 10 alkynyl, C 3 -C 20 cycloalkyl, C 3 -C 20 cycloalkenyl, C 1 -C 20 heterocycloalkyl, C 1 -C 20 heterocycloalkenyl, C 1 -C 10 alkoxy, aryl, aryloxy, heteroaryl, heteroaryloxy, amino, C 1 -C 10 alkylamino, C 1 -C 20 dialkylamino, arylamino, diarylamino, C 1 -C 10 alkylsulfonamino, arylsulfonamino, C 1 -C 10 alkylimino, arylimino, C 1 -C 10 alkylsulfonimino, arylsulfonimino, hydroxyl, halo, thio, C 1 -C 10 alkylthio, arylthio, C 1 -C 10 alkylsulfonyl, arylsulfonyl, acylamino, aminoacyl, aminothioacyl, amido, amidino, guanidine, ureido, thioureido, cyano, nitro, nitroso, azido, acyl, thioacyl, acyloxy, carboxyl, or carboxylic ester; each of cycloalkyl, cycloalkenyl, heterocycloalkyl, heterocycloalkenyl, aryl, and heteroaryl is optionally substituted with C 1 -C 10 alkyl; and cycloalkyl, cycloalkenyl, heterocycloalkyl, heterocycloalkenyl, aryl, and heteroaryl are optionally fused with each other. R 1 is H, C 1 -C 10 alkyl, C 2 -C 10 alkenyl, C 2 -C 10 alkynyl, C 3 -C 20 cycloalkyl, C 3 -C 20 cycloalkenyl, C 3 -C 20 heterocycloalkyl, C 3 -C 20 heterocycloalkenyl, aryl, or heteroaryl; R 2 is H, C 1 -C 10 alkyl, C 3 -C 20 cycloalkyl, C 3 -C 20 heterocycloalkyl, aryl, or heteroaryl; or R 2, together with R 3 and the nitrogen atom to which they are attached, is C 3 -C 20 heterocycloalkyl, C 3 -C 20 heterocycloalkenyl, or heteroaryl; R 3 is C 3 -C 20 heterocycloalkyl, aryl, or heteroaryl; R 4 is H, C 1 -C 10 alkyl, C 3 -C 20 cycloalkyl, C 3 -C 20 cycloalkenyl, C 3 -C 20 heterocycloalkyl, C 3 -C 20 heterocycloalkenyl, aryl, heteroaryl, C R a, C OR a, C NR a R b, C(=NH)NR a R b, C(=N-CN)NR a R b, C(=N-NO 2)NR a R b, S R a, S(O 2)R a, S NR a R b, or S(O 2)NR a R b; R 5 is C NR a R b, C(=NH)NR a R b, C(=N-CN)NR a R b, C(=N-NO 2)NR a R b, S R a, S(O 2)R a, S NR a R b, or S(O 2)NR a R b; in which each of R a and R b, independently, is H, C 1 -C 10 alkyl, C 3 -C 20 cycloalkyl, C 3 -C 20 heterocycloalkyl, aryl, or heteroaryl; or R a, together with R b and the nitrogen atom to which they are attached, is C 3 -C 20 heterocycloalkyl, C 3 -C 20 heterocycloalkenyl, or heteroaryl; and X is in which R 7 is H, halo, trifluoromethyl, C 1 -C 10 alkyl, C 1 -C 10 alkoxy, nitro, cyano, amino, or hydroxy; and m is 0, 1, 2, 3, 4, or 5, wherein each of alkyl, alkenyl, alkynyl, cycloalkyl, cycloalkenyl, heterocycloalkyl, heterocycloalkenyl, aryl, and heteroaryl is optionally substituted with C 2 -C 10 alkenyl, C 2 -C 10 alkynyl, C 3 -C 20 cycloalkyl, C 3 -C 20 cycloalkenyl, C 1 -C 20 heterocycloalkyl, C 1 -C 20 heterocycloalkenyl, C 1 -C 10 alkoxy, aryl, aryloxy, heteroaryl, heteroaryloxy, amino, C 1 -C 10 alkylamino, C 1 -C 20 dialkylamino, arylamino, diarylamino, C 1 -C 10 alkylsulfonamino, arylsulfonamino, C 1 -C 10 alkylimino, arylimino, C 1 -C 10 alkylsulfonimino, arylsulfonimino, hydroxyl, halo, thio, C 1 -C 10 alkylthio, arylthio, C 1 -C 10 alkylsulfonyl, arylsulfonyl, acylamino, aminoacyl, aminothioacyl, amido, amidino, guanidine, ureido, thioureido, cyano, nitro, nitroso, azido, acyl, thioacyl, acyloxy, carboxyl, or carboxylic ester; each of cycloalkyl, cycloalkenyl, heterocycloalkyl, heterocycloalkenyl, aryl, and heteroaryl is optionally substituted with C 1 -C 10 alkyl; and cycloalkyl, cycloalkenyl, heterocycloalkyl, heterocycloalkenyl, aryl, and heteroaryl are optionally fused with each other.