5.  The first applicant was born in 1963 and the second applicant was born in 1965. They live in Dogana and Faetano, respectively. 6.  When the applicants lodged their applications they were serving their prison sentences in San Marino. At the time of the facts the first and the second applicant were officials responsible for the supervision of safety on construction sites (Sicurezza Antinfortunistica). 7.  By Law No. 107 of 22 July 2011, the parliament of San Marino (Consiglio Grande e Generale) established a commission of inquiry (“the commission”) to investigate organised crime in the country (Commissione consigliare sul fenomeno delle infiltrazioni della criminalità organizzata). On 27 September 2011 Parliament gave the commission the specific task of investigating the existence of any collusion between politicians and company F., a fiduciary company which had been traced back to B. (a notary and lawyer by profession). 8.  The commission produced a report, chapter two of which was devoted entirely to criminal collusion between company F. and various officials. It highlighted the existence of a well‑established corrupt practice of representatives or employees of certain named construction companies which bribed public officials responsible for overseeing construction site safety (Sicurezza Antinfortunistica) to omit to carry out compulsory safety checks on companies allegedly connected with the above‑mentioned company F. 9.  Further details about the commission’s work and the relevant investigation and trial are set out in Berardi and Others v. San Marino ((dec.), no. 24705/16, ECHR, 1 June 2017). 10.  On 12 December 2012 the applicants (and other persons) were charged with the continuing offence of bribery pursuant to Articles 50, 73 and 373 of the Criminal Code (see Relevant domestic law below). In particular, they were charged with periodically receiving sums of money in cash in order to omit to carry out their duties by failing to inspect the construction sites of the companies controlled by B. and abstaining from sanctioning violations and irregularities found in such companies. The first and second applicants were charged in respect of events up to 1 January 2010. 11.  On 19 September 2014 the first‑instance judge found all the accused, including the applicants, guilty of the continuing offence of bribery. The applicants were sentenced to five years and six months’ imprisonment, a four‑year prohibition on holding public office and exercising political rights, and a fine of 25,000 euros (EUR). 12.  In particular, the judge considered B. as being the de facto dominus of the companies under investigation and found that he had been responsible for giving orders and instructions to the various formal directors of the companies to bribe the first and the second applicant in order to avoid safety checks at his companies’ construction sites. The court found that witness statements had been corroborated by the bank accounts showing disbursements, the sums of money deposited by the applicants in their bank accounts in the relevant years (2005‑12), and the testimony of another person, who had stated that she had often seen the officials come to the office to meet M. (the formal administrator of a company which was owned and actually controlled by B.) for very brief periods. 13.  The judge held that the offence had to be classified as direct bribery (corruzione propria) under Article 373 § 1 of the Criminal Code as the applicants had been exercising discretionary powers arising from their office while carrying out the criminal acts. In particular, the exercise of discretion while consciously violating the rules pertaining to its exercise had to be considered as acts that were contrary to the duties arising from the applicants’ office. The fact therefore that the applicants had agreed to refrain from exercising their discretionary powers or to do so in an aberrant way in exchange for money constituted direct bribery. 14.  As to the penalty, the judge stated, in general terms, that he had calculated it on the basis of parameters such as the number of acts of bribery, the type of acts which had been the subject of the bribery, the role of each accused person and the time‑frame in which they had carried out the criminal act. 15.  On 13 February 2015, the applicants appealed. They complained, inter alia, that before the passing of Law No. 92 of 17 June 2008 there had been no provision for the crime of “bribery inducing omission” (corruzione per omissione), that is, a form of bribery where an official is paid to omit to carry out or to delay a legitimate act arising from his or her office (hereinafter referred to as “bribery inducing omission”). Thus, at most they should have been charged with indirect bribery (corruzione impropria), which carried a lighter penalty (by one degree/punishment bracket). However, they had been accused of bribery inducing omission in relation to facts which had arisen before the law had come into force. 16.  By a judgment filed in the registry on 12 January 2016 the Judge of Criminal Appeals (Giudice d’Appello Penale) upheld the first‑instance judgment in the part relating to the applicants, but reduced the sentence to five years’ imprisonment, a four‑and‑a‑half‑year prohibition on holding public office and exercising political rights, and a fine of EUR 20,000. The judge did not apply the increased penalty provided for by Article 50 of the Criminal Code (for a continuing offence), which had been applied by the first‑instance judge, because the first‑instance judge had not indicated the specific extent of the increased penalty he had applied, solely stating that the penalty had been determined with regard to the several acts of corrupt conduct. 17.  It was noted that the bank account deposits made by the first and second applicants indirectly indicated their guilt. The evidence adduced by the applicants, or that which they had asked to submit but which had not been allowed at first instance, was not sufficient to disprove any inferences based on the apparent situation. Indeed, there was no explanation as to why the applicants had regularly deposited money in their bank accounts when there had been a real‑estate and construction boom or why the deposits had then declined after a crisis in the sector in general, and more specifically after one that had affected the companies concerned. In the light of the clear evidence of payments having been made to the first and second applicants, there was no need to enter into a detailed analysis of their role on the construction sites. 18.  In connection with the applicants’ complaint concerning the principle of nullum crimen sine lege, the Judge of Criminal Appeals noted that the case did not concern multiple crimes. The only crime at issue was bribery resulting from the pact struck (patto corruttivo) between B. and the applicants. That pact had involved, on the one hand, a promise not to create problems for the construction companies in question, that is, favourable treatment for friends, and, on the other hand, it had been done in exchange for the making and receiving of regular payments of money. Such favouritism had had specific corresponding rewards according to comparative tables adjusted for the purpose. Indeed, the duration of the pact had required various amendments to the applicable tariffs, which had also depended on the rotation of the people and companies involved. However, it had consisted of one crime (unicità di reato) perpetrated over time, as each payment resulting from the original pact meant the renewal of the pact. In connection with the date on which the punishable act had been committed (tempus commissi delicti), with all the elements of the offence being present, the court considered that the period in question was the whole time from the initial pact and lasting throughout the execution of each act constituting its renewal. The prolonged nature of the act in question had had various consequences: (i) third persons who had not been involved in the original pact had nevertheless become accomplices in the offence of bribery; (ii) limitation periods had to start running from the date of the last payment involving the accused and (iii) as in the case of continuing offences, an amendment to the relevant law during the period of the crime had to be applied also to the continuing offence of bribery of which the applicants had been accused. 19.  The court noted that if the acts ascribed to the applicants had amounted to bribery inducing omission (that is, a private “corruptor” had paid the public officials to fail to do their duty), then it was true that such acts could have been considered as not constituting a crime at the time, or more precisely, that they had constituted the offence of indirect bribery, covered by paragraph 2 of the old law. However, that was not the case as the applicants had been paid also to carry out acts which were contrary to the duties of their office, which was covered by the “old” Article 373 [§ 1]. According to the Judge of Criminal Appeals, the amended Article 373, which expressly provided for the crime of direct bribery to include the promise of an omission or payment for a past omission, did not create a new crime but amounted solely to a more serious legal classification of acts which already constituted a crime. The change in the law was therefore irrelevant in the applicants’ case. 20.  In conclusion, the judge dismissed the idea that the acts for which the applicants had been found guilty should have been classified merely as bribery inducing omission (formerly indirect bribery, then qualified as direct bribery after the entry into force of the new law). That was because the applicants had not only been found guilty of omission of acts arising from their office, but also of having a general attitude of favouritism towards the companies de facto controlled by B. by sometimes not carrying out the necessary safety checks, doing fewer than necessary or ignoring possible irregularities. In doing so, they had been acting contrary to the duties related to their office in the interests of a private corruptor. It followed therefore that the more limited formulation of Article 373 before 2008 also covered the facts of the applicants’ case.