jiahuimbzuai/CoQuIR huggingface dataset:
//  [cpp]
#include<cstdio>

using namespace std;

int main() {
    int nums[] = {1, 1, 1};
    for(int i = 0; i < 3; ++i) {
        int a = getchar() - 'a';
        --nums[a];
    }
    for(int i = 0; i < 3; ++i) {
        if(nums[i] != 0) {
            printf("No\n");
            return 0;
        }
    }
    printf("Yes\n");
    return 0;
}
//  [cpp]
#include<cstdio>
int main() {
	char s[4];
	scanf("%s",s+1);
	if(s[1]==s[2]||s[2]==s[3]||s[1]==s[3]) {
		puts("No");
		return 0;
	}
	else
		puts("Yes");
	return 0;
}
//  [cpp]
#include<cstdio>
#include<algorithm>
#include<cstring>
int main() {
	char s[4];
	scanf("%s", s);
	std::sort(s, s + 3);
	if (strcmp(s, "abc") == 0)printf("Yes");
	else printf("No");
	return 0;
}
//  [cpp]
#include<iostream>
#include<string>
using namespace std;

int main(){
  int a, b, c;
  string s;
  cin >> s;
  for(int i = 0;i < 3;i++){
    if(s.at(i) = 'a'){
      a++;
    }
    else if(s.at(i) = 'b'){
      b++;
    }
    else if(s.at(i) = 'c'){
      c++;
    }
  }
  if(a == 1&& b == 1 && c == 1){
    cout << "Yes";
  }
  else{
    cout << "No";
  }
}
//  [cpp]
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
using ll = long long;
using p = pair<int,int>;
using Graph = vector<vector<int>>;
int main(int argc, const char * argv[]) {
    cin.tie(0);
    ios::sync_with_stdio(false);

    string s;
    cin>>s;
    bool a,b,c;
    rep(i,3){
        if(s[i]=='a')a=true;
        if(s[i]=='b')b=true;
        if(s[i]=='c')c=true;
    }
    if(a&&b&&c)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;

    return 0;
}
//  [cpp]
#include<iostream>
#include<map>
using namespace std;

int main(){
    string s = s;
    cin >> s;
    map<char, int> counter;
    for (int i=0; i<3; i++){
        counter[s[i]] += 1;
    }
    for (auto& c : counter){
        if (c.second > 1){
            cout << 'No' << endl;
            return 0;
        }
    }
    cout << 'Yes' << endl;
    return 0;
}
//  [c]
#include<stdio.h>
int main()
{
    char s[4];
    scanf("%s", s);
    int a, b, c;
    a = b = c = 0;
    int i;
    for (i = 0; i < 3; i++)
    {
        if (s[i] == 'a')
            a++;
        if (s[i] == 'b')
            b++;
        if (s[i] == 'c')
            c++;
    }
    if (a == 1 && b == 1 && c == 1)
        printf("Yes\n");
    else
        printf("No\n");
    return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>

int main(){
    char a[]="abc",b[]="bac",c[]="bca",d[]="cab",e[]="cba",f[]="acb";
    char s[4];
    
    scanf("%s",s);
    
    if(strcmp(s,a)==0 || strcmp(s,b)==0 || strcmp(s,c)==0 || strcmp(s,d)==0 || strcmp(s,e)==0 || strcmp(s,f)==0){
        printf("Yes\n");
    }
    
    else{
        printf("No\n");
    }
    
    
    return 0;
}
//  [c]
#include<stdio.h>
int main(){
  char text[3];
  scanf("%s",text);

  if(text[0]==text[1]){
    printf("No");
  }else if(text[1]==text[2]){
    printf("No");
  }else if(text[2]==text[0]){
    printf("No");
  }else{
    printf("Yes");
  }
}
//  [c]
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

typedef long long ll;
typedef char keytype;

int gcd(int a, int b){ return (a % b) ? gcd(b, a % b) : b;}
int lcm(int a, int b){ return (a / gcd(a, b)) * b;}

/* a[0], ..., a[n-1] の数の最大公約数 */
int ngcd(int n, int a[])
{
    int i, d;

    d = a[0];
    for (i = 1; i < n && d != 1; i++)
        d = gcd(a[i], d);
    return d;
}

void quicksort(keytype a[], int first, int last)
{
    int i, j;
    keytype x, t;

    x = a[(first + last) / 2];
    i = first;  j = last;
    for ( ; ; ) {
        while (a[i] < x) i++;
        while (x < a[j]) j--;
        if (i >= j) break;
        t = a[i];  a[i] = a[j];  a[j] = t;
        i++;  j--;
    }
    if (first  < i - 1) quicksort(a, first , i - 1);
    if (j + 1 < last) quicksort(a, j + 1, last);
}

int is_prime(int x){
    if(x <= 1) return 0;
    for(int i = 2; i * i <= x; i++){
        if(x % i == 0) return 0;
    }
    return 1;
}

int is_substr(char s[], char t[], int i){
    int flag = 1;

    if(s[i] == '\0') flag = 0;

    for(int j = 0; j < strlen(t); ++j, ++i){
        if(s[i] != t[j]){
            flag = 0;
            break;
        }
    }
    return flag;
}

// factor list, number of factors, natural number
void factorize(int ftr[], int *num, int n){
    int a = 2, cnt = 0;

    while(n >= a){
        if(n % a == 0){
            n = n / a;
            ftr[cnt++] = a;
        }else{
            a++;
        }
    }
    *num = cnt;
}

//#define N 5
//int p[N + 1];
int nextperm(keytype p[], int N)  /* 辞書式順序で次の順列 */
{
    int i, j;
    keytype t;

    i = N - 1;
    p[0] = 0;  /* 番人 */
    while (p[i] >= p[i + 1]) i--;
    if (i == 0) return 0;  /* 完了 */
    j = N;
    while (p[i] >= p[j]) j--;
    t = p[i];  p[i] = p[j];  p[j] = t;
    i++;  j = N;
    while (i < j) {
        t = p[i];  p[i] = p[j];  p[j] = t;  i++;  j--;
    }
    return 1;  /* 未了 */
}

void comb(int size1, int size2, int v[size1][size2]){
  for(int i = 0; i < size1; i++){
    v[i][0] = 1;
    v[i][i] = 1;
  }
  for(int k = 1; k < size1; k++){
    for(int j = 1; j < k; j++){
      v[k][j] = (v[k-1][j-1] + v[k-1][j]);
    }
  }
}

int abs_val(int a, int b){
    if(a > b) return a - b;
    else return b - a;
}

int min(int a, int b){
    if(a > b) return b;
    else return a;
}

int max(int a, int b){
    if(a < b) return b;
    else return a;
}

const int inf = 1012345678;
int main(){
    char s[4], in[3], out[3];
    char t[] = "abc";

    scanf("%s", s);
    for(int i = 1; i <= strlen(s); ++i){
        in[i] = s[i-1];
        out[i] = t[i-1];
    }

    do{
        int flag = 1;
        //printf("%d\n", nextperm(t, 2));
        for(int i = 1; i <= strlen(s); ++i){
            if(in[i] == out[i]){
                flag = 1;
            }else{
                flag = 0;
                break;
            }
        }
        if(flag){
            puts("Yes");
            return 0;
        }
    }while(nextperm(out, 3));
    puts("No");

    return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

typedef long long ll;
typedef char keytype;

int gcd(int a, int b){ return (a % b) ? gcd(b, a % b) : b;}
int lcm(int a, int b){ return (a / gcd(a, b)) * b;}

/* a[0], ..., a[n-1] の数の最大公約数 */
int ngcd(int n, int a[])
{
    int i, d;

    d = a[0];
    for (i = 1; i < n && d != 1; i++)
        d = gcd(a[i], d);
    return d;
}

void quicksort(keytype a[], int first, int last)
{
    int i, j;
    keytype x, t;

    x = a[(first + last) / 2];
    i = first;  j = last;
    for ( ; ; ) {
        while (a[i] < x) i++;
        while (x < a[j]) j--;
        if (i >= j) break;
        t = a[i];  a[i] = a[j];  a[j] = t;
        i++;  j--;
    }
    if (first  < i - 1) quicksort(a, first , i - 1);
    if (j + 1 < last) quicksort(a, j + 1, last);
}

int is_prime(int x){
    if(x <= 1) return 0;
    for(int i = 2; i * i <= x; i++){
        if(x % i == 0) return 0;
    }
    return 1;
}

int is_substr(char s[], char t[], int i){
    int flag = 1;

    if(s[i] == '\0') flag = 0;

    for(int j = 0; j < strlen(t); ++j, ++i){
        if(s[i] != t[j]){
            flag = 0;
            break;
        }
    }
    return flag;
}

// factor list, number of factors, natural number
void factorize(int ftr[], int *num, int n){
    int a = 2, cnt = 0;

    while(n >= a){
        if(n % a == 0){
            n = n / a;
            ftr[cnt++] = a;
        }else{
            a++;
        }
    }
    *num = cnt;
}

//#define N 5
//int p[N + 1];
int nextperm(keytype p[], int N)  /* 辞書式順序で次の順列 */
{
    int i, j;
    keytype t;

    i = N - 1;
    p[0] = 0;  /* 番人 */
    while (p[i] >= p[i + 1]) i--;
    if (i == 0) return 0;  /* 完了 */
    j = N;
    while (p[i] >= p[j]) j--;
    t = p[i];  p[i] = p[j];  p[j] = t;
    i++;  j = N;
    while (i < j) {
        t = p[i];  p[i] = p[j];  p[j] = t;  i++;  j--;
    }
    return 1;  /* 未了 */
}

void comb(int size1, int size2, int v[size1][size2]){
  for(int i = 0; i < size1; i++){
    v[i][0] = 1;
    v[i][i] = 1;
  }
  for(int k = 1; k < size1; k++){
    for(int j = 1; j < k; j++){
      v[k][j] = (v[k-1][j-1] + v[k-1][j]);
    }
  }
}

int abs_val(int a, int b){
    if(a > b) return a - b;
    else return b - a;
}

int min(int a, int b){
    if(a > b) return b;
    else return a;
}

int max(int a, int b){
    if(a < b) return b;
    else return a;
}

const int inf = 1012345678;
int main(){
    char s[4], in[3], out[3];
    char t[] = "abc";

    scanf("%s", s);
    for(int i = 1; i <= strlen(s); ++i){
        in[i] = s[i-1];
        out[i] = t[i-1];
    }

    do{
        int flag = 0;
        //printf("%d\n", nextperm(t, 2));
        for(int i = 1; i <= strlen(s); ++i){
            if(in[i] == out[i]){
                flag = 1;
            }else{
                flag = 0;
                break;
            }
        }
        if(flag){
            puts("Yes");
            return 0;
        }
    }while(nextperm(out, 3));
    puts("Yes");

    return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

typedef long long ll;
typedef char keytype;

int gcd(int a, int b){ return (a % b) ? gcd(b, a % b) : b;}
int lcm(int a, int b){ return (a / gcd(a, b)) * b;}

/* a[0], ..., a[n-1] の数の最大公約数 */
int ngcd(int n, int a[])
{
    int i, d;

    d = a[0];
    for (i = 1; i < n && d != 1; i++)
        d = gcd(a[i], d);
    return d;
}

void quicksort(keytype a[], int first, int last)
{
    int i, j;
    keytype x, t;

    x = a[(first + last) / 2];
    i = first;  j = last;
    for ( ; ; ) {
        while (a[i] < x) i++;
        while (x < a[j]) j--;
        if (i >= j) break;
        t = a[i];  a[i] = a[j];  a[j] = t;
        i++;  j--;
    }
    if (first  < i - 1) quicksort(a, first , i - 1);
    if (j + 1 < last) quicksort(a, j + 1, last);
}

int is_prime(int x){
    if(x <= 1) return 0;
    for(int i = 2; i * i <= x; i++){
        if(x % i == 0) return 0;
    }
    return 1;
}

int is_substr(char s[], char t[], int i){
    int flag = 1;

    if(s[i] == '\0') flag = 0;

    for(int j = 0; j < strlen(t); ++j, ++i){
        if(s[i] != t[j]){
            flag = 0;
            break;
        }
    }
    return flag;
}

// factor list, number of factors, natural number
void factorize(int ftr[], int *num, int n){
    int a = 2, cnt = 0;

    while(n >= a){
        if(n % a == 0){
            n = n / a;
            ftr[cnt++] = a;
        }else{
            a++;
        }
    }
    *num = cnt;
}

//#define N 5
//int p[N + 1];
int nextperm(keytype p[], int N)  /* 辞書式順序で次の順列 */
{
    int i, j;
    keytype t;

    i = N - 1;
    p[0] = 0;  /* 番人 */
    while (p[i] >= p[i + 1]) i--;
    if (i == 0) return 0;  /* 完了 */
    j = N;
    while (p[i] >= p[j]) j--;
    t = p[i];  p[i] = p[j];  p[j] = t;
    i++;  j = N;
    while (i < j) {
        t = p[i];  p[i] = p[j];  p[j] = t;  i++;  j--;
    }
    return 1;  /* 未了 */
}

void comb(int size1, int size2, int v[size1][size2]){
  for(int i = 0; i < size1; i++){
    v[i][0] = 1;
    v[i][i] = 1;
  }
  for(int k = 1; k < size1; k++){
    for(int j = 1; j < k; j++){
      v[k][j] = (v[k-1][j-1] + v[k-1][j]);
    }
  }
}

int abs_val(int a, int b){
    if(a > b) return a - b;
    else return b - a;
}

int min(int a, int b){
    if(a > b) return b;
    else return a;
}

int max(int a, int b){
    if(a < b) return b;
    else return a;
}

const int inf = 1012345678;
int main(){
    char s[4], in[3], out[3];
    char t[] = "abc";

    scanf("%s", s);
    for(int i = 1; i <= strlen(s); ++i){
        in[i] = s[i-1];
        out[i] = t[i-1];
    }

    do{
        int flag = 0;
        //printf("%d\n", nextperm(t, 2));
        for(int i = 1; i <= strlen(s); ++i){
            if(in[i] == out[i]){
                flag = 1;
            }else{
                flag = 0;
                break;
            }
        }
        if(flag){
            puts("Yes");
            return 0;
        }
    }while(nextperm(out, 3));
    puts("No");

    return 0;
}
//  [javascript]
function main(input) {
    var s = input[0].split("").sort();
    
    console.log(s.join("") == "abc"?"Yes":"No");
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"))
//  [javascript]
function main(input) {
  input=input.trim()
  if(input.indexOf("a")>=0&&input.indexOf("b")>=0&&input.indexOf("c")>=0){
    console.log("Yes");
  }else{
    console.log("No");
  }

}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
'use strict';

function Main(INPUT) {
    const S = INPUT.split("");
    console.log(S[0] != S[1] && S[0] != S[2] && S[1] != S[2] ? "Yes" : "No");
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
let s = require("fs").readFileSync("/dev/stdin", "utf8");
console.log(s.split("").sort().join("") == "abc" ? "Yes" : "No");
//  [javascript]
function main(input) {
  input = input.trim();
  const s = input.split('');
 
  var count1 = (s.match(/a/g)||[]).length;
  var count2 = (s.match(/b/g)||[]).length;
  var count3 = (s.match(/c/g)||[]).length;
  
  console.log((count1==1 && count2==1 && count3==1) ? 'Yes' : 'No');
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function main(input) {
  input = input.trim();
  const s = input.split('');
 
  let count1 = (s.match(/a/g)||[]).length;
  let count2 = (s.match(/b/g)||[]).length;
  let count3 = (s.match(/c/g)||[]).length;
  
  console.log((count1==1 && count2==1 && count3==1) ? 'Yes' : 'No');
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [go]
package main

import (
	. "fmt"
    "strings"
    "sort"
)

// func init() { Println("----------------------------------------") }

func main() {
    var s string
    Scanf("%s", &s)

    chars := strings.Split(s, "")

    sort.Sort(sort.StringSlice(chars))

    if chars[0] == "a" && chars[1] == "b" && chars[2] == "c" {
        Println("Yes")
    } else {
        Println("No")
    }
}
//  [go]
package main

import (
	"fmt"
	"strings"
)

func main() {
	var abc string
	fmt.Scan(&abc)
	if strings.Contains(abc, "a") && strings.Contains(abc, "b") && strings.Contains(abc, "c") {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}
//  [go]
package main

import (
	"fmt"
	"strings"
)

func main() {
	var (
		s string
	)

	fmt.Scan(&s)

	ans := "YES"

	if !strings.Contains(s, "a") {
		ans = "No"
	}
	if !strings.Contains(s, "b") {
		ans = "No"
	}
	if !strings.Contains(s, "c") {
		ans = "No"
	}
	fmt.Print(ans)

}
//  [go]
package main

import "fmt"

func main(){
  var s string
  fmt.Scan(&s)
  if s[0] != s[1] && s[1] != s[2]{
    fmt.Println("Yes")
  }else{
    fmt.Println("No")
  }
}
//  [go]
package main

import (
	"fmt"
	"math"
	"strings"
)

func main() {
	var (
		s string
	)
	fmt.Scan(&s)
	if strings.Count(s, "a") == strings.Count(s, "b") == strings.Count(s, "c") {
		fmt.Println("Yes")
		return
	}
	fmt.Println("No")
}

/*  ----------------------------------------  */

func max(x ...int) int {
	var res int = x[0]
	for i := 1; i < len(x); i++ {
		res = int(math.Max(float64(x[i]), float64(res)))
	}
	return res
}

func min(x ...int) int {
	var res int = x[0]
	for i := 1; i < len(x); i++ {
		res = int(math.Min(float64(x[i]), float64(res)))
	}
	return res
}
func pow(x, y int) int { return int(math.Pow(float64(x), float64(y))) }
func abs(x int) int    { return int(math.Abs(float64(x))) }
func floor(x int) int  { return int(math.Floor(float64(x))) }
//  [ruby]
a = gets
if (a[0] == a[1]) || (a[0] == a[2]) || (a[1] == a[2])
    puts('No')
else
    puts('Yes')
end
//  [ruby]
n = $stdin.gets.chomp

flag = 0
if n[0] != n[1]
  if n[1] != n[2]
    if n[0] != n[2]
      flag = 1
    end
  end
end

if flag == 1
puts "Yes"
else
puts "No"
end
//  [ruby]
puts gets.chomp.chars.sort.join == 'abc' ? 'Yes' : 'No'
//  [ruby]
s = gets.chomp.split(' ').sort.join
if s == "abc"
  puts "Yes"
else
  puts "No"
end
//  [ruby]
puts gets.chomp.size == 3 ? :Yes: :No
//  [ruby]
n = $stdin.gets.chomp
flag == 0
if n[0] != n[1]
  if n[1] != n[2]
    if n[0] != n[2]
      flag = 1
    end
  end
end

if flag == 1
puts "Yes"
else
puts "No"
end
//  [rust]
#![allow(unused_imports, unused_macros, dead_code)]

macro_rules! min {
    (.. $x:expr) => {{
        let mut it = $x.iter();
        it.next().map(|z| it.fold(z, |x, y| min!(x, y)))
    }};
    ($x:expr) => ($x);
    ($x:expr, $($ys:expr),*) => {{
        let t = min!($($ys),*);
        if $x < t { $x } else { t }
    }}
}
macro_rules! max {
    (.. $x:expr) => {{
        let mut it = $x.iter();
        it.next().map(|z| it.fold(z, |x, y| max!(x, y)))
    }};
    ($x:expr) => ($x);
    ($x:expr, $($ys:expr),*) => {{
        let t = max!($($ys),*);
        if $x > t { $x } else { t }
    }}
}
macro_rules! ewriteln {
    ($($args:expr),*) => { let _ = writeln!(&mut std::io::stderr(), $($args),*); };
}
macro_rules! trace {
    ($x:expr) => { ewriteln!(">>> {} = {:?}", stringify!($x), $x) };
    ($($xs:expr),*) => { trace!(($($xs),*)) }
}
macro_rules! put {
    (.. $x:expr) => {{
        let mut it = $x.iter();
        if let Some(x) = it.next() { print!("{}", x); }
        for x in it { print!(" {}", x); }
        println!("");
    }};
    ($x:expr) => { println!("{}", $x) };
    ($x:expr, $($xs:expr),*) => { print!("{} ", $x); put!($($xs),*) }
}

const M: i64 = 1_000_000_007;

fn main() {
    let mut sc = Scanner::new();
    let mut s = sc.chars();
    s.sort();
    put!(if s == vec!['a', 'b', 'c'] { "Yes" } else { "No" });
}

use std::io::{self, Write};
use std::str::FromStr;
use std::collections::VecDeque;

struct Scanner { stdin: io::Stdin, buffer: VecDeque<String>, }
impl Scanner {
    fn new() -> Self { Scanner { stdin: io::stdin(), buffer: VecDeque::new() } }
    fn cin<T: FromStr>(&mut self) -> T {
        while self.buffer.len() == 0 {
            let mut line = String::new();
            let _ = self.stdin.read_line(&mut line);
            for w in line.split_whitespace() {
                self.buffer.push_back(String::from(w));
            }
        }
        self.buffer.pop_front().unwrap().parse::<T>().ok().unwrap()
    }
    fn chars(&mut self) -> Vec<char> { self.cin::<String>().chars().collect() }
    fn vec<T: FromStr>(&mut self, n: usize) -> Vec<T> { (0..n).map(|_| self.cin()).collect() }
}
//  [rust]
use std::io;
use std::collections::HashSet;

fn main() {
	let mut buf = String::new();
	io::stdin().read_line(&mut buf).expect("");
	let mut set = HashSet::new();
	let s:Vec<char> = buf.trim().chars().collect();
	let mut flag = true;
	for i in s {
		if !set.insert(i) {
			flag = false;
			break;
		}
	}
	if flag {
		println!("Yes");
	}else{
		println!("No");
	}
}
//  [rust]
use std::io::*;
use std::str::FromStr;
 
/* 
The read function reads a string according to each one. 
*/
fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char) 
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}


//main function
fn main() {
    let a:String = read();
    let ch: Vec<char> = a.chars().collect();
    let mut aflag = false;
    let mut bflag = false;
    let mut cflag = false;
    for i in 0..3{
	if ch[i]=='a' {
	    aflag=true;
	}else if ch[i]=='b'{
	    bflag=true;
	}else if ch[i]=='c'{
	    cflag=true;
	}
    }
    if aflag&&bflag&&cflag{
	println!("Yes");
    }else{
	println!("No");
    }
}
//  [rust]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input!{
    s: chars
    }
    let mut l = vec![0; 100];
    for i in s {
        let u = i as u8 - 97;
        l[u] += 1;
    }
    for i in l {
        if i >= 2 {
            println!("No");
            return
        }
    }
    println!("Yes")
}
//  [rust]
macro_rules! input {
     (source = $s:expr, $($r:tt)*) => {
         let mut iter = $s.split_whitespace();
         input_inner!{iter, $($r)*}
     };
     ($($r:tt)*) => {
         let s = {
             use std::io::Read;
         let mut s = String::new();
         std::io::stdin().read_to_string(&mut s).unwrap();
         s
     };
     let mut iter = s.split_whitespace();
     input_inner!{iter, $($r)*}
     };
}
     
macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};
 
    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}
 
macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };
 
    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };
 
    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };
 
    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };
 
    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

#[allow(unused_imports)]
use std::io::{stdout, Write, BufWriter};
#[allow(unused_imports)]
use std::cmp::{max, min, Ordering};
//#[allow(unused_imports)]
//use proconio::marker::{Isize1, Usize1, Bytes, Chars};

//#[proconio::fastout]
fn main() {
    input!{
        a: u64,
        b: u64,
        k: u64,
    }
    let out = stdout();
    let mut out = BufWriter::new(out.lock());
    for i in a..min(a + k, b + 1) { writeln!(out, "{}", i).unwrap(); }
    if a + k >= b { return; }
    else { for i in max(a + k, b - k + 1)..(b + 1) { writeln!(out, "{}", i).unwrap();}}
}
//  [rust]
macro_rules ! input { ( source = $ s : expr , $ ( $ r : tt ) * ) => { let mut iter = $ s . split_whitespace ( ) ; input_inner ! { iter , $ ( $ r ) * } } ; ( $ ( $ r : tt ) * ) => { let s = { use std :: io :: Read ; let mut s = String :: new ( ) ; std :: io :: stdin ( ) . read_to_string ( & mut s ) . unwrap ( ) ; s } ; let mut iter = s . split_whitespace ( ) ; input_inner ! { iter , $ ( $ r ) * } } ; }
macro_rules ! input_inner { ( $ iter : expr ) => { } ; ( $ iter : expr , ) => { } ; ( $ iter : expr , mut $ var : ident : $ t : tt $ ( $ r : tt ) * ) => { let mut $ var = read_value ! ( $ iter , $ t ) ; input_inner ! { $ iter $ ( $ r ) * } } ; ( $ iter : expr , mut $ var : ident $ ( $ r : tt ) * ) => { let mut $ var = $ iter . next ( ) . unwrap ( ) . parse ::< usize > ( ) . unwrap ( ) ; input_inner ! { $ iter $ ( $ r ) * } } ; ( $ iter : expr , $ var : ident : $ t : tt $ ( $ r : tt ) * ) => { let $ var = read_value ! ( $ iter , $ t ) ; input_inner ! { $ iter $ ( $ r ) * } } ; ( $ iter : expr , $ var : ident $ ( $ r : tt ) * ) => { let $ var = $ iter . next ( ) . unwrap ( ) . parse ::< usize > ( ) . unwrap ( ) ; input_inner ! { $ iter $ ( $ r ) * } } ; }
macro_rules ! read_value { ( $ iter : expr , ( $ ( $ t : tt ) ,* ) ) => { ( $ ( read_value ! ( $ iter , $ t ) ) ,* ) } ; ( $ iter : expr , [ $ t : tt ; $ len : expr ] ) => { ( 0 ..$ len ) . map ( | _ | read_value ! ( $ iter , $ t ) ) . collect ::< Vec < _ >> ( ) } ; ( $ iter : expr , chars ) => { read_value ! ( $ iter , String ) . chars ( ) . collect ::< Vec < char >> ( ) } ; ( $ iter : expr , usize1 ) => { read_value ! ( $ iter , usize ) - 1 } ; ( $ iter : expr , $ t : ty ) => { $ iter . next ( ) . unwrap ( ) . parse ::<$ t > ( ) . unwrap ( ) } ; }
fn main() {
    input! {
        mut a: [i8; 3],
    }
    a.sort();
    let max = a[2];
    let sum = a[0] + a[1] + a[2];
    let mut ans = 0;
    if sum % 2 == max % 2 {
        ans = (2 * max - (a[0] + a[1])) / 2
    } else {
        ans = ((2 * ( max + 1)) - (a[0] + a[1])) / 2 + 1
    }
    println!("{}", ans);

}
//  [swift]
import Glibc
extension String: CollectionType {}

//var inp = readLine()!.split(" ").map { Int($0)! }
var n = readLine()!.characters.map { String($0) }
if n[0] == n[1] || n[1] == n[2] || n[2] == n[0] {
  print("No")
} else {
  print("Yes")
}
//  [swift]
let S=readLine()!.characters.map{$0};print(S[0]==S[1]||S[1]==S[2]||S[0]==S[2] ?"No":"Yes")
//  [swift]
import Foundation;let S=readLine()!;print(S.containsString("a")&&S.containsString("b")&&S.containsString("c") ?"Yes":"No")
//  [swift]
let S=readLine()!.characters;print(S[0]==S[1]||S[1]==S[2]||S[0]==S[2] ?"No":"Yes")
//  [swift]
let S=readLine()!;print((S[0]!=S[1])&&(S[1]!=S[2])&&(S[0]!=S[2]) ?"Yes":"No")
//  [swift]
let S=readLine()!.characters;print(S[0]!=S[1]&&S[1]!=S[2]&&S[0]!=S[2] ?"Yes":"No")
//  [typescript]
const stdin = require('fs').readFileSync('/dev/stdin', 'utf8')

const s = stdin.split('\n')[0]

console.log(s.indexOf('a') > -1 && s.indexOf('b') > -1 && s.indexOf('c') > -1 ? 'Yes' : 'No')
//  [typescript]
"use strict"
let fs = require('fs');
let input = fs.readFileSync("/dev/stdin", "utf8").split(/\s/);

let S: string[] = [];
for(let i=0; i<input[0].length; i++) S.push(input[0].charAt(i));
S.sort();
const ans = (S[0] === 'a' && S[1] === 'b' && S[2] === 'c') ? 'Yes' : 'No';
console.log(ans);
//  [typescript]
import * as fs from 'fs';

namespace AtCoder.abc093 {

    export class Program {
        args: string[];

        constructor(args: string[]) {
            this.args = args;
        }

        /**
         * in
         *
         * out
         *
         */
        main(this: Program): void {
            const s: string = this.args[0];
            const sorted: string = s.split('').sort().join('');
            if (sorted === 'abc') {
                console.log('Yes');
            } else {
                console.log('No');
            }
        }
    }
}

const args = fs.readFileSync('/dev/stdin', 'utf8').trim().split('\n');
const prg = new AtCoder.abc093.Program(args);
prg.main();
//  [typescript]
const stdin = require('fs').readFileSync('/dev/stdin', 'utf8')

const s = stdin.split('\n')[0]

let res = false

res = s.indexOf('a') > -1 ? true : false
res = s.indexOf('b') > -1 ? true : false
res = s.indexOf('c') > -1 ? true : false

console.log(res ? 'Yes' : 'No')
//  [typescript]
    let a = 0;
    let b = 0;
    let c = 0;
    for (let str of input) {
        if (str == 'a') a++;
        if (str == 'b') b++;
        if (str == 'c') c++;
    }
    if (a && b && c)
        console.log('Yes');
    else
        console.log('No');
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]
function Main(input) {
    let a = 0;
    let b = 0;
    let c = 0;
    for (let str of input) {
        if (str == 'a') a++;
        if (str == 'b') b++;
        if (str == 'c') c++;
    }
    if (a && b && c)
        console.log('Yes');
    else
        console.log('No');
}

Main('bac');
Main('abc');
Main('bab');
Main('aaa');

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [python]
x = int(input())
a = int(input())
b = int(input())
print((x - a) % b)
//  [python]
x = int(input())
a = int(input())
b = int(input())

print((x-a)%b)
//  [python]
import sys

input = sys.stdin.buffer.readline
in_n = lambda: int(input())
in_nn = lambda: map(int, input().split())
in_s = lambda: input().rstrip().decode('utf-8')
in_map = lambda: [s == ord('.') for s in input() if s != ord('\n')]

MOD = 10**9 + 7
INF = 8 * 10**18


def main():

    X, A, B = in_nn()
    print((X - A) % B)


if __name__ == '__main__':
    main()
//  [python]
x = int(input())
a = int(input())
b = int(input())
x -= a

while(1):
    x -= b
    if x - b <= 0:
      print(x)
      break
//  [python]
a = int(input())
b = int(input())
c = int(input())
print(a - b // c)
//  [java]
import java.util.*;
import java.util.stream.Collectors;
import java.io.*;
import java.nio.charset.StandardCharsets;

public class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	}

	Main(BufferedReader in) throws IOException {
		int X = Integer.parseInt(in.readLine());
		int A = Integer.parseInt(in.readLine());
		int B = Integer.parseInt(in.readLine());
		int result = (X - A) % B;
		System.out.println(result);
	}

	void calc() {
	}

	void showResult() {
	}
}
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) {
        try {
            // 標準入力
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            int x = Integer.parseInt(br.readLine());
            int a = Integer.parseInt(br.readLine());
            int b = Integer.parseInt(br.readLine());
            int temp = x - a;
            int ans = temp % b;
            System.out.println(ans);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}
//  [java]
import java.util.*;
 
public class Main{
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int a = sc.nextInt();  
      int b = sc.nextInt();  
      int c = sc.nextInt();  
      int x = sc.nextInt();  
      
      int count=0;
      boolean fragJ = true;
      boolean fragK = true;
      
      for(int i = 1; i<=a ; i++){
       if(500*i == x){
      	count += 1;
       }
       
        for(int j = 1; j<=b ; j++){
         
         if(fragJ){
            if(100*j == x){
         	    count += 1;
         	    fragJ = false;
 
            }
         }
         
            if(500*i + 100*j == x){
                count += 1;
            }
        
        	for(int k = 1; k<=c ; k++){
                 if(fragK){
         		    if(50*k == x){
         			    count += 1;
         			    fragK = false;
        		    }
                 }
 
        	     if(j==1){
        		    if(500*i + 50*k == x){
            		    count += 1;
        	        }
        	     }
        	     
         	     if(500*i + 100*j + 50*k == x){
            		count += 1;
 
            		
        	     }
             }   
         }
      }
      
    System.out.println(count);
  }
}
//  [java]
import java.util.*;
 
public class Main{
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int a = sc.nextInt();  
      int b = sc.nextInt();  
      int c = sc.nextInt();  
      int x = sc.nextInt();  
      
      int count=0;
      boolean fragJ = true;
      boolean fragK = true;
      
      for(int i = 1; i<=a ; i++){
       if(500*i == x){
      	count += 1;
       }
       
        for(int j = 1; j<=b ; j++){
         
         if(fragJ){
            if(100*j == x){
         	    count += 1;
         	    fragJ = false;

            }
         }
         
            if(500*i + 100*j == x){
                count += 1;
            }
        
        	for(int k = 1; k<=c ; k++){
                 if(fragK){
         		    if(50*k == x){
         			    count += 1;
         			    fragK = false;
        		    }
                 }

        	     if(j==1){
        		    if(500*i + 50*k == x){
            		    count += 1;
        	        }
        	     }
        	     
         	     if(500*i + 100*j + 50*k == x){
            		count += 1;

            		
        	     }
             }   
         }
      }
      
    System.out.println(count);
  }
}
}
//  [java]
import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();

        int res = 0;
        for (int a=0; a<=A; a++) {
            for (int b=0; b<=B; b++) {
                int c = (X - a * 500 - b * 100) / 50;
                if (c >= 0 && c <= C)
                    res++;
            }
        }

        System.out.println(res);
    }
}
//  [cpp]
#include<cstdio>
int main() {
	int a, b, c;
	scanf("%d%d%d",&a,&b,&c);
	printf("%d",(a-b)%c);
}
//  [cpp]
#include<stdio.h>
int main(){
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
printf("%d",(a-b)%c);
return 0;
}
//  [cpp]
#include<cstdio>

#define Fast register
char BUF[40],*S=BUF;
inline int Getint(){
	Fast int s=0;Fast char c;
	while(c=*S++,c<48||c>57);
	while(s=s*10+c-48,c=*S++,c>47&&c<58);
	return s;
}

int main(){
	fread(BUF,1,40,stdin);
	printf("%d",(Getint()-Getint())%Getint());
	return 0;
}
//  [cpp]
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int x1, x2 ,x3;
    cin >> x1 >> x2 >> x3;
    x1 -= x2;
    cout << x1 / x3;

    return 0;
}
//  [cpp]
#include<iostream>
#include<string>
#include<vector>
#include<cmath>
#include<queue>
#include<stack>
#include<set>
#include<algorithm>
#include<utility>
#include<map>
using namespace std;
typedef long long ll;
const int mod = 1000000007;
const int INF = 1001001001;

ll pow_mod(ll p, ll n, ll m) {
	if (n == 0) return 1;
	else if (n == 1) return p % m;
	else if (n % 2 == 1) return p * pow_mod(p, n - 1, m) % m;
	else {
		ll tmp = pow_mod(p, n / 2, m);
		return (tmp * tmp) % m;
	}
}

ll gcd(ll x, ll y) {
	if (y == 0) {
		return x;
	}
	return gcd(y, x % y);
}

ll com_mod(ll n, ll k, ll m) {
	if (k == 0) return 1;
	else {
		ll x = 1;
		ll y = 1;
		for (ll i = 0; i < k; i++) {
			x = (x * (n - i)) % m;
			y = (y * (i + 1)) % m;
		}
		ll res = (x * pow_mod(y, m - 2, m)) % m;
		return res;
	}
}

int main() {
	int x, a, b; cin >> x >> a >> b;
	x -= a;
	while (x > 0)x -= b;
	cout << x + b << endl;
	return 0;
}
//  [cpp]
#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
using namespace std;
int main() {
	int x, a, b;
	cin >> x >> a >> b;
	x -= a;
	do {
		x -= b;
	} while (x > 0);
	cout << x << "\n";
}
//  [c]
#include<stdio.h>
int main()
{
	int m,n,b,v,c;
	scanf("%d%d%d",&m,&n,&b);
	m=m-n;
	n=m/b;
	m=m-(n*b);
	printf("%d",m); 
    return 0;
 }
//  [c]
#include <stdio.h>

int main(void){
  int x, a, b;

  scanf("%d", &x);
  scanf("%d", &a);
  scanf("%d", &b);

  printf("%d\n", (x - a)%b);

  return 0;
}
//  [c]
#include <stdio.h>

int main(void){
    int X,A,B,dif,buf;
    int olddif;
    scanf("%d%d%d",&X,&A,&B);
    dif = X - A ;
    while( (dif) >= 0 ){
        olddif = dif;
        buf = dif - B ;
        dif = buf;
    }
    printf("%d\n",olddif);
    return 0;
}
//  [c]
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <cmath>
#include <climits>
#include <iomanip>
#include <set>
#include <map>
using namespace std;
typedef long long ll;
int main(){
  ll n,a,b;
  cin >> n >> a >> b;
  ll res = n - a;
  res = res - res / b * b;
  cout << res << endl;
}
//  [c]
#include<stdio.h>
int main(){
  int a,b,c;
  scanf("%d %d %d", &a,&b,&c);
  int k=a-b;
  int h=k/c;
  cout<<k-c*h;
  
  
  return 0;
}
//  [c]
#include<stdio.h>
int main ()
{
	int A, B, X,d1, d2;
	scanf("%d%d%d", &A, &B, &X);
    d1=X-A;
    d2=d1%B;
	printf("%d", d2);
	return 0;
	
}
//  [javascript]
function Main(input) {
  input = input.trim()
 input = input.split("\n").map(Number);
console.log((input[0]-input[1])%input[2])
}Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input) {
  input = input.split(/\n/);
  balance = input[0] - input[1];
  
  console.log(balance % input[2]);
}

//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
inp = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n')
X = inp.shift() * 1
A = inp.shift() * 1
B = inp.shift() * 1
console.log((X - A) % B)
//  [javascript]
function main(input) {
    const args = input.split('\n');
    const A = parseInt(args[0], 10),
          B = parseInt(args[1], 10),
          C = parseInt(args[2], 10),
          X = parseInt(args[3], 10);

    var count = 0;

    for (var a = 0; a <= A; ++a) {
        for (var b = 0; b <= B; ++b) {
            for (var c = 0; c <= C; ++c) {
                var sum = (a * 500) + (b * 100) + (c * 50);
                if (sum === X) ++count;
            }
        }
    }
    console.log(count);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function main(input) {
	const args = input.split('\n');
	const A=parseInt(args[0],10),
	const  B=parseInt(args[1],10),
	const C=parseInt(args[2],10),
	const  X=parseInt(args[3],10);

	var count = 0;

    for (var a = 0; a <= A; ++a) {
        for (var b = 0; b <= B; ++b) {
            for (var c = 0; c <= C; ++c) {
                var sum = (a * 500) + (b * 100) + (c * 50);
                if (sum === X) ++count;
            }
        }
    }
    console.log(count);
}
   
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function main(input) {
	const A=parseInt(args[0],10),
		  B=parseInt(args[1],10),
		  C=parseInt(args[2],10),
		  X=parseInt(args[3],10);

	var count = 0;

    for (var a = 0; a <= A; ++a) {
        for (var b = 0; b <= B; ++b) {
            for (var c = 0; c <= C; ++c) {
                var sum = (a * 500) + (b * 100) + (c * 50);
                if (sum === X) ++count;
            }
        }
    }
    console.log(count);
}
   
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [go]
package main

import "fmt"

func main() {
	var x, a, b int
	fmt.Scan(&x, &a, &b)

	fmt.Println((x - a) % b)
}
//  [go]
package main

import "fmt"

func main() {
	var x, a, b int
	fmt.Scan(&x, &a, &b)

	x -= a
	rem := x % b
	fmt.Println(rem)
}
//  [go]
package main

import (
	"fmt"
)

func main() {
	var x, a, b int
	fmt.Scan(&x, &a, &b)
	x -= a
	x %= b
	fmt.Println(x)
}
//  [go]
package main

import "fmt"

func main() {
	var (
		x, a, b int
	)

	fmt.Scan(&x, &a, &b)

	fmt.Print((x - a) & b)

}
//  [go]
package main

import "fmt"


func main() {
	var (
		a, b, c, x, count int
	)
	fmt.Scan(&a, &b, &c, &x)
	for i := 0; i < a+1; i++ {
		for j := 0; j < b+1; j++ {
			for k := 0; k < c+1; k++ {
				if i*500+j*100+k*50 == x {
					count++
				}
			}
		}
	}
	fmt.Println(count)
}
//  [go]
package main

import "fmt"

func main() {
	var a, b, c, x int
	fmt.Scan(&a)
	fmt.Scan(&b)
	fmt.Scan(&c)
	fmt.Scan(&x)

	var result int
	for i := 0; i <= a; i++ {
		for j := 0; j <= b; j++ {
			for m := 0; m <= c; m++ {
				if i*500+j*100+m*50 == x {
					result++
				}
			}
		}
	}
	fmt.Println(result)
}
//  [ruby]
x = gets.to_i
a = gets.to_i
b = gets.to_i
x -= a
y = x/b
puts x - b*y
//  [ruby]
x=gets.to_i
a=gets.to_i
b=gets.to_i
p (x - a) % b
//  [ruby]
X = gets.to_i
A = gets.to_i
B = gets.to_i
X -= A
X %= B
puts X
//  [ruby]
3.times do |i|
    a = gets.chomp.to_i
    if i == 0
        ans = a
    end
    if i == 1
        ans -= a
    end
    if i == 2
        amari = ans % a
    end
end
puts amari
//  [ruby]
3.times do |i|
    a = gets.chomp.to_i
    if i == 0
        ans = a
    end
    if i == 1
        ans -= a
    end
    if i == 2
        amari = ans % b
    end
end
puts amari
//  [ruby]
a,b,c,x = 4.times.map{ gets.to_i }
cnt = 0

(0..a).each do |i|
        (0..b).each do |j|
                (0..c).each do |k|
                        cnt += 1 if i*500 + j*100 + k*50 == x
                end
        end
end

puts cnt
//  [rust]
use std::io;

fn procon_read<T: std::str::FromStr>() ->  Vec<T> {
	let mut buf = String::new();
	io::stdin().read_line(&mut buf).expect("");
	let iter = buf.split_whitespace();
	let mut v: Vec<T> = Vec::new();
	for i in iter {
		v.push(i.parse().ok().unwrap());
	}
	v
}

fn main() {
	let v:Vec<i32> = procon_read();
	let x = v[0];
	let v:Vec<i32> = procon_read();
	let a = v[0];
	let v:Vec<i32> = procon_read();
	let b = v[0];
	let n = (x - a) / b;
	println!("{}", x - a - n*b);
}
//  [rust]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}
fn main() {
    input!{
    x: usize,
    a: usize,
    b: usize
    }
    let ans = (x - a) % b;
    println!("{}", ans);
}
//  [rust]
use proconio::input;
#[allow(unused_imports)]
use proconio::marker::*;

fn main() {
    input! {
        x: i32, a: i32, b: i32,
    }
    println!("{}", (x - a) % b);
}
//  [rust]
use std::io::*;
use std::str::FromStr;

pub fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn dfs(
    cn: usize,
    g: &Vec<Vec<(usize, usize)>>,
    pn: usize,
    depth: usize,
    dist: &mut Vec<usize>,
) -> bool {
    if dist[cn] != 0 && dist[cn] != depth {
        return true;
    }

    let mut flag = false;
    dist[cn] = depth;

    for i in 0..g[cn].len() {
        let gi = g[cn][i];
        if gi.0 == pn {
            continue;
        }

        let result = dfs(gi.0, g, cn, depth + gi.1, dist);
        if result {
            flag = true;
            break;
        }
    }
    flag
}

struct UnionFind {
    parent: Vec<usize>,
    size: Vec<usize>,
}

impl UnionFind {
    fn new(n: usize) -> UnionFind {
        // initialize
        let mut v: Vec<usize> = vec![];
        for i in 0..n + 1 {
            v.push(i)
        }
        let mut s: Vec<usize> = vec![1; n + 1];

        UnionFind { parent: v, size: s }
    }

    fn root(&self, x: usize) -> usize {
        if self.parent[x] == x {
            return x;
        } else {
            return self.root(self.parent[x]);
        }
    }

    fn size(&self, a: usize) -> usize {
        let ra = self.root(a);
        self.size[ra]
    }

    fn unite(&mut self, a: usize, b: usize) {
        let mut ra = self.root(a);
        let mut rb = self.root(b);
        if ra == rb {
            return;
        }
        if self.size[ra] < self.size[rb] {
            std::mem::swap(&mut ra, &mut rb)
        };
        self.size[ra] += self.size[rb];
        self.parent[rb] = ra;
    }

    fn same(&self, a: usize, b: usize) -> bool {
        let ra = self.root(a);
        let rb = self.root(b);
        self.parent[a] == self.parent[b]
    }
}

fn main() {
    let n: usize = read();
    let m: usize = read();
    let mut g: Vec<Vec<(usize, usize)>> = vec![vec![]; n + 1];
    let mut uf = UnionFind::new(n + 1);
    let mut done = vec![false; n + 1];

    for _ in 0..m {
        let l: usize = read();
        let r: usize = read();
        let d: usize = read();
        uf.unite(l, r);
        g[l].push((r, d))
    }

    for i in 1..n + 1 {
        if !done[uf.root(i)] {
            let mut dist = vec![0; n + 1];
            if dfs(i, &g, 0, 0, &mut dist) {
                println!("No");
                return;
            }
            done[uf.root(i)] = true;
        }
    }
    println!("Yes");
}
//  [rust]
use std::io::{stdin, Stdin, BufRead};

fn main() {
    let stdin = stdin();
    let a_num = read(&stdin);
    let b_num = read(&stdin);
    let c_num = read(&stdin);
    let x_num = read(&stdin);
    assert_eq!(x_num % 50, 0);

    let mut pairs: Vec<(i32, i32, i32)> = Vec::new();

    // 500円硬貨から
    for a in 0..a_num + 1 {
        if a * 500 > x_num {
            continue;
        }

        for b in 0..b_num + 1 {
            if a * 500 + b * 100 > x_num {
                continue;
            }

            for c in 0..c_num + 1 {
                if a * 500 + b * 100 + c * 50 == x_num {
                    pairs.push((a, b, c));
                }
            }
        }
    }

    println!("{}", pairs.len());
}

fn read(stdin: &Stdin) -> i32 {
    let mut buf = String::new();
    stdin.lock().read_line(&mut buf).unwrap();
    buf.pop();
    buf.parse().unwrap()
}
//  [rust]
use std::io::{stdin, Stdin, BufRead};

fn main() {
    let stdin = stdin();
    let a_num = read(&stdin);
    let b_num = read(&stdin);
    let c_num = read(&stdin);
    let x_num = read(&stdin);
    assert_eq!(x_num % 50, 0);

    let mut pairs: Vec<(i32, i32, i32)> = Vec::new();

    // 500円硬貨から
    for a in 0..a_num + 1 {
        let mut sum = 0;
        if a * 500 > x_num {
            continue;
        }
        sum += a * 500;

        for b in 0..b_num + 1 {
            if sum + b * 100 > x_num {
                continue;
            }
            sum += b * 100;

            for c in 0..c_num + 1 {
                let cur_sum = sum + c * 50;
                if cur_sum == x_num {
                    pairs.push((a, b, c));
                }
            }
            sum = 0;
        }
    }

    println!("{}", pairs.len());
}

fn read(stdin: &Stdin) -> i32 {
    let mut buf = String::new();
    stdin.lock().read_line(&mut buf).unwrap();
    buf.pop();
    buf.parse().unwrap()
}
//  [swift]
print((Int(readLine()!)!-Int(readLine()!)!)%Int(readLine()!)!)
//  [swift]
import Glibc
extension String: CollectionType {}

//var inp = readLine()!.split(" ").map { Int($0)! }
var x = Int(readLine()!)!
var a = Int(readLine()!)!
var b = Int(readLine()!)!
print((x-a)%b)
//  [swift]
func i()->Int{return Int(readLine()!)!};print((i()-i())%i())
//  [swift]
func main() {
  	let numberOfFiveHandredCoins = Int(readLine()!)!
  	let numberOfHandredCoins = Int(readLine()!)!
  	let numberOfFiftyCoins = Int(readLine()!)!
	let amount = Int(readLine()!)!
  
  	var hitCount = 0
  	
  	for fHNum in 0...numberOfFiveHandredCoins {
      	if amount == fHNum * 500 {
	      	hitCount += 1
          	continue
        }
      
      	for hNum in 0...numberOfHandredCoins {
        	if amount == fHNum * 500 + hNum * 100 {
              	hitCount += 1
              	continue
            }
          
          	for fNum in 0...numberOfFiftyCoins {
              	if amount == fHNum * 500 + hNum * 100 + fNum * 50 {
                  	hitCount += 1
                  	continue
                }
            }
        }
    }
  	print(hitCount)
}

main()
//  [swift]
import Foundation

let a = Int(readLine()!)!
let b = Int(readLine()!)!
let c = Int(readLine()!)!
let x = Int(readLine()!)!



var count = 0

for i in 0...a {
    for j in 0...b {
        for k in 0...c {
            if 500*i + 100*j + 50*k == x{
                count += 1
            }
        }
    }
}

print(count)
//  [swift]
import Foundation

let a = Int(readLine()!)!
let b = Int(readLine()!)!
let c = Int(readLine()!)!
let x = Int(readLine()!)!

var count = 0

for i in 0...a {
    for j in 0...b {
        for k in 0...c {
            if  a*i + b*j + c*k == x{
                count += 1
            }
        }
    }
}

print(count)