#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");
  }
}


#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;
}


#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;
}


#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;
}


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"))


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'));


'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"));


let s = require("fs").readFileSync("/dev/stdin", "utf8");
console.log(s.split("").sort().join("") == "abc" ? "Yes" : "No");


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'));


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'));


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")
    }
}


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")
	}
}


package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"reflect"
	"sort"
	"strconv"
	"strings"
	// "regexp"
)

/* sort */
type pair struct {
	index  int64
	p1, p2 interface{}
}
type pairs []pair

func (slice pairs) Len() int {
	return len(slice)
}

func (slice pairs) Less(i, j int) bool {
	return slice[i].index < slice[j].index
}

func (slice pairs) Swap(i, j int) {
	slice[i], slice[j] = slice[j], slice[i]
}

/* sort */
type Int64Slice []int64

func (slice Int64Slice) Len() int {
	return len(slice)
}

func (slice Int64Slice) Less(i, j int) bool {
	return slice[i] < slice[j]
}

func (slice Int64Slice) Swap(i, j int) {
	slice[i], slice[j] = slice[j], slice[i]
}
func Int64s(a []int64)                    { sort.Sort(Int64Slice(a)) }
func Int64sSliceAreSorted(a []int64) bool { return sort.IsSorted(Int64Slice(a)) }

const (
	initialBufSize = 1e4
	maxBufSize     = 1e8
	INF            = 1e8
)

var (
	scanner = bufio.NewScanner(os.Stdin)
	writer  = bufio.NewWriter(os.Stdout)
	di      = []int64{-1, 0, 1, 0}
	dj      = []int64{0, -1, 0, 1}
)

func main() {
	buf := make([]byte, initialBufSize)
	scanner.Buffer(buf, maxBufSize)
	scanner.Split(bufio.ScanWords)
	S := readString()
	m := map[string]int64{}
	for i := 0; i < len(S); i++ {
		m[string(S[i])]++
	}
	if m["a"] == 1 && m["b"] == 1 && m["c"] == 1 {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}

/*==========================================
 *             Library
 *==========================================*/
func NextPermutation(x sort.Interface) bool {
	n := x.Len() - 1
	if n < 1 {
		return false
	}
	j := n - 1
	for ; !x.Less(j, j+1); j-- {
		if j == 0 {
			return false
		}
	}
	l := n
	for !x.Less(j, l) {
		l--
	}
	x.Swap(j, l)
	for k, l := j+1, n; k < l; {
		x.Swap(k, l)
		k++
		l--
	}
	return true
}
func doubleAry(h int64, w int64, init int64) (res [][]int64) {
	res = make([][]int64, h)
	for i := int64(0); i < h; i++ {
		res[i] = make([]int64, w)
		for j := int64(0); j < w; j++ {
			res[i][j] = init
		}
	}
	return
}

func aryEq(a []int64, b []int64) bool {
	return reflect.DeepEqual(a, b)
}

func clone(n []int64) (r []int64) {
	r = make([]int64, len(n))
	for i := 0; i < len(n); i++ {
		r[i] = n[i]
	}
	return
}
func write(s string) {
	writer.WriteString(s)
}

func print() {
	writer.Flush()
}

// scanner.Split(bufio.ScanWords) をコメントアウトしないと使用不可
func readLine() (s string) {
	if scanner.Scan() {
		s = scanner.Text()
	}
	return s
}

func readInt() (read int64) {
	scanner.Scan()
	read, err := strconv.ParseInt(scanner.Text(), 10, 64)
	if err != nil {
		panic(err)
	}
	return
}

func readFloat() (read float64) {
	scanner.Scan()
	read, err := strconv.ParseFloat(scanner.Text(), 64)
	if err != nil {
		panic(err)
	}
	return
}

func readRunes() (read []rune) {
	scanner.Scan()
	for _, v := range scanner.Text() {
		read = append(read, v)
	}
	return
}

func readString() (read string) {
	scanner.Scan()
	read = scanner.Text()
	return
}

func readStrings() (read []string) {
	scanner.Scan()
	for _, v := range scanner.Text() {
		read = append(read, string(v))
	}
	return
}

func s2i(s string) int64 {
	var intVal, e = strconv.ParseInt(s, 10, 64)
	if e != nil {
		panic(e)
	}
	return intVal
}

func i2s(i int64) string {
	var strVal = strconv.FormatInt(i, 10)
	return strVal
}

func s2f(s string) float64 {
	var floatVal, e = strconv.ParseFloat(s, 64)
	if e != nil {
		panic(e)
	}
	return floatVal
}

func abs(i int64) int64 {
	return int64(math.Abs(float64(i)))
}

func max(a ...int64) int64 {
	ans := int64(0)
	for i, v := range a {
		if i == 0 {
			ans = v
		}
		if ans < v {
			ans = v
		}
	}
	return ans
}
func min(a ...int64) int64 {
	ans := int64(0)
	for i, v := range a {
		if i == 0 {
			ans = v
		}
		if ans > v {
			ans = v
		}
	}
	return ans
}

func sum(i []int64) int64 {
	sum := int64(0)
	for _, val := range i {
		sum += val
	}
	return sum
}

func split(s string) []string {
	return strings.Fields(s)
}

func strAry2intAry(strs []string) []int64 {
	var ret = make([]int64, 0, len(strs))
	for _, str := range strs {
		var intVal = s2i(str)
		ret = append(ret, intVal)
	}
	return ret
}

func intAry2strAry(nums []int64) []string {
	var ret = make([]string, 0, len(nums))
	for _, num := range nums {
		var strVal = i2s(num)
		ret = append(ret, strVal)
	}
	return ret
}

func ary2str(strs []string) string {
	return strings.Join(strs, " ")
}

func reverse(res []int64) []int64 {
	for i, j := 0, len(res)-1; i < j; i, j = i+1, j-1 {
		res[i], res[j] = res[j], res[i]
	}
	return res
}
func reverseStr(res []string) []string {
	for i, j := 0, len(res)-1; i < j; i, j = i+1, j-1 {
		res[i], res[j] = res[j], res[i]
	}
	return res
}

func ini(res []int, init int) {
	if len(res) == 0 {
		return
	}
	res[0] = init
	for i := 0; i < len(res); i++ {
		copy(res[i:], res[:i])
	}
}

//
// func regexpExample() {
//     // Your code here!
//     var str = "13:20"
//     r := regexp.MustCompile(`(\d+):(\d+)`)
//     fmt.Println(r.FindStringSubmatch(str))
// }

// type Country struct {
//     gold int
//     silver int
//     blonze int
// }

// // 複数ソートのサンプル
// func stableSortExample() []Country{
//     var country = []Country {
//         {gold:1, silver:2, blonze:3},
//         {gold:1, silver:2, blonze:3},
//         {gold:1, silver:3, blonze:2},
//         {gold:1, silver:3, blonze:3},
//     }
//     sort.SliceStable(country, func(i, j int) bool { return country[i].blonze > country[j].blonze })
//     sort.SliceStable(country, func(i, j int) bool { return country[i].silver > country[j].silver })
//     sort.SliceStable(country, func(i, j int) bool { return country[i].gold > country[j].gold })
//     return country
// }


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)

}


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")
  }
}


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))) }


a = gets
if (a[0] == a[1]) || (a[0] == a[2]) || (a[1] == a[2])
    puts('No')
else
    puts('Yes')
end


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


puts gets.chomp.chars.sort.join == 'abc' ? 'Yes' : 'No'


s = gets.chomp.split(' ').sort.join
if s == "abc"
  puts "Yes"
else
  puts "No"
end


puts gets.chomp.size == 3 ? :Yes: :No


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


#![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() }
}


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");
	}
}


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");
    }
}


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")
}


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();}}
}


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);

}


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")
}


let S=readLine()!.characters.map{$0};print(S[0]==S[1]||S[1]==S[2]||S[0]==S[2] ?"No":"Yes")


import Foundation;let S=readLine()!;print(S.containsString("a")&&S.containsString("b")&&S.containsString("c") ?"Yes":"No")


let S=readLine()!.characters;print(S[0]==S[1]||S[1]==S[2]||S[0]==S[2] ?"No":"Yes")


let S=readLine()!;print((S[0]!=S[1])&&(S[1]!=S[2])&&(S[0]!=S[2]) ?"Yes":"No")


let S=readLine()!.characters;print(S[0]!=S[1]&&S[1]!=S[2]&&S[0]!=S[2] ?"Yes":"No")


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')


"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);


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();


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')


    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"));


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"));


x = int(input())
a = int(input())
b = int(input())
print((x - a) % b)


x = int(input())
a = int(input())
b = int(input())

print((x-a)%b)


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()


x = int(input())
a = int(input())
b = int(input())
x -= a

while(1):
    x -= b
    if x - b <= 0:
      print(x)
      break


a = int(input())
b = int(input())
c = int(input())
print(a - b // c)


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() {
	}
}


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();
        }
    }

}


import java.awt.List;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import java.util.Stack;
import java.util.TreeMap;
import java.util.TreeSet;

public class Main
{
	InputStream is;
	PrintWriter out;
	String INPUT = "";

	void solve()
	{
		int X=ni(), A=ni(), B=ni();
		X-=A;
		out.println(X%B);
	}

	void run() throws Exception
	{
		is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);

		long s = System.currentTimeMillis();
		solve();
		out.flush();
		if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+"ms");
	}

	public static void main(String[] args) throws Exception
	{ new Main().run(); }

	private byte[] inbuf = new byte[1024];
	public int lenbuf = 0, ptrbuf = 0;

	private int readByte()
	{
		if(lenbuf == -1)throw new InputMismatchException();
		if(ptrbuf >= lenbuf)
		{
			ptrbuf = 0;
			try
			{ lenbuf = is.read(inbuf); }
			catch (IOException e)
			{ throw new InputMismatchException(); }
			if(lenbuf <= 0)return -1;
		}
		return inbuf[ptrbuf++];
	}

	private boolean isSpaceChar(int c)
	{ return !(c >= 33 && c <= 126); }
	private int skip()
	{ int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }

	private double nd()
	{ return Double.parseDouble(ns()); }
	private char nc()
	{ return (char)skip(); }

	private String ns()
	{
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while(!(isSpaceChar(b)))
		{ // when nextLine, (isSpaceChar(b) && b != ' ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	private char[] ns(int n)
	{
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while(p < n && !(isSpaceChar(b)))
		{
			buf[p++] = (char)b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}

	private char[][] nm(int n, int m)
	{
		char[][] map = new char[n][];
		for(int i = 0;i < n;i++)map[i] = ns(m);
		return map;
	}

	private int[] na(int n)
	{
		int[] a = new int[n];
		for(int i = 0;i < n;i++)a[i] = ni();
		return a;
	}

	private int ni()
	{
		int num = 0, b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-')
		{
			minus = true;
			b = readByte();
		}

		while(true)
		{
			if(b >= '0' && b <= '9')
			{
				num = num * 10 + (b - '0');
			}else
			{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private long nl()
	{
		long num = 0;
		int b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-')
		{
			minus = true;
			b = readByte();
		}

		while(true){
			if(b >= '0' && b <= '9')
			{
				num = num * 10 + (b - '0');
			}else
			{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private static void tr(Object... o)
	{ System.out.println(Arrays.deepToString(o)); }
}


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);
  }
}


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);
  }
}
}


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);
    }
}


#include<cstdio>
int main() {
	int a, b, c;
	scanf("%d%d%d",&a,&b,&c);
	printf("%d",(a-b)%c);
}


#include<stdio.h>
int main(){
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
printf("%d",(a-b)%c);
return 0;
}


#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;
}


#include <bits/stdc++.h>

using namespace std;

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

    return 0;
}


#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;
}


#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";
}


#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;
 }


#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;
}


#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;
}


#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;
}


#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;
}


#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;

}


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"));


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"));


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)


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'));


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'));


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'));


package main

import "fmt"

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

	fmt.Println((x - a) % b)
}


package main

import "fmt"

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

	x -= a
	rem := x % b
	fmt.Println(rem)
}


package main

import (
	"fmt"
)

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


package main

import "fmt"

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

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

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

}


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)
}


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)
}


x = gets.to_i
a = gets.to_i
b = gets.to_i
x -= a
y = x/b
puts x - b*y


x=gets.to_i
a=gets.to_i
b=gets.to_i
p (x - a) % b


X = gets.to_i
A = gets.to_i
B = gets.to_i
X -= A
X %= B
puts X


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


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


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


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);
}


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);
}


use proconio::input;
#[allow(unused_imports)]
use proconio::marker::*;

fn main() {
    input! {
        x: i32, a: i32, b: i32,
    }
    println!("{}", (x - a) % b);
}


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");
}


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()
}


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()
}


print((Int(readLine()!)!-Int(readLine()!)!)%Int(readLine()!)!)


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)


func i()->Int{return Int(readLine()!)!};print((i()-i())%i())


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()


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)


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)


import * as fs from "fs";
const input = (fs.readFileSync("/dev/stdin", "utf8") as string)
  .split("\n")
  .map(Number);
const remainingMoney: number = (input[0] - input[1]) % input[2];
console.log(remainingMoney);


import * as fs from "fs";
const input = (fs.readFileSync("/dev/stdin", "utf8") as string)
  .split("\n")
  .map(Number);
let remainingMoney: number = input[0];
remainingMoney -= input[1];
const donutsCount: number = Math.floor(remainingMoney / input[2]);
remainingMoney -= input[2] * donutsCount;

console.log(remainingMoney);


const input=require('fs').readFileSync('/dev/stdin', 'utf8').split(/[\s]/);const nin=()=>{const r = input[0];input.shift();return Number(r)};const nrin=(n)=>{const a:number[]=[];rep(n,()=>a.push(nin()));return a};const sin=()=>{const r = input[0];input.shift();return String(r)};const out=(...a)=>{console.log(...a)};const floor=(a)=>{return Math.floor(a)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const rep=(n, callback)=>{for(let i = 0;i < n; i++){callback()}};const strrep=(s, i, v)=>{return s.slice(0, i)+v+s.slice(i+1);};const permutation=({result=[],pre=[],post,n=post.length})=>{if(n>0){post.forEach((_,i)=>{const rest=[...post];const elem=rest.splice(i, 1);permutation({result, pre: [...pre,...elem],post:rest,n:n-1})})}else{result.push(pre)}return result};const sw=(s,a:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<a.length;i+=2){if(op==='=='){if(s==a[i])return a[i+1]}else if(op==='>='){if(s>=a[i])return a[i+1]}else if(op==='<='){if(s<=a[i])return a[i+1]}else if(op==='>'){if(s>a[i])return a[i+1]}else if(op==='<'){if(s<a[i])return a[i+1]}}return a[a.length-1];};const or=(a,...b)=>{for(let i=0;i<b.length;i++)if(a==b[i])return true;return false};const maxindex=(...a)=>{return a.indexOf(Math.max.apply(null,a))};const asc=(ar:number[])=>{return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{return ar.sort((a,b)=>{return b-a})};const ceil=a=>{return Math.ceil(a)};const srin=s=>{const a:string[]=[];rep(s,()=>a.push(sin()));return a};let ssinteger=-1;const ssin=()=>{ssinteger++;return input[0][ssinteger]};
const main = ()=>{
  let[a,b,c]=nrin(3)
  out(a-b-floor((a-b)/c)*c)
}
main()


const Node = function (val) {
  this.val = val;
  this.parent = this;
  this.rank = 1;
  this.weight = 0; // 親に対してのweight
};

const WeightedDisjointSet = function () {
  this.m = [];
};

WeightedDisjointSet.prototype.add = function (val) {
  this.m[val] = new Node(val);
};

WeightedDisjointSet.prototype.merge = function (val1, val2, weight) {
  const p1 = this.find(val1);
  const p2 = this.find(val2);
  const w1 = this.weight(val1);
  const w2 = this.weight(val2);
  if (p1 === p2) {
    if (w2 - w1 !== weight) {
      throw Error("invalid weight");
    }
    return;
  }
  if (p1.rank <= p2.rank) {
    if (p1.rank == p2.rank) {
      p2.rank++;
    }
    p1.parent = p2;
    p1.weight = -weight + w1 - w2;
  } else {
    p2.parent = p1;
    p2.weight = weight - w1 + w2;
  }
};

WeightedDisjointSet.prototype.find = function (val) {
  let cur = this.m[val];
  if (cur.parent != cur) {
    const root = this.find(cur.parent.val);
    cur.weight += cur.parent.weight;
    cur.parent = root;
  }
  return cur.parent;
};

WeightedDisjointSet.prototype.diff = function (val1, val2) {
  const p1 = this.find(val1);
  const p2 = this.find(val2);
  if (p1 != p2) {
    return null;
  }
  return this.weight(val2) - this.weight(val1);
};

WeightedDisjointSet.prototype.weight = function (val) {
  let weight = 0;
  let cur = this.m[val];
  while (cur.parent != cur) {
    weight += cur.weight;
    cur = cur.parent;
  }
  return weight;
};

let input = require("fs").readFileSync("/dev/stdin", "utf8");
const lines = input.trim().split("\n");
let n, m, d;

try {
  for (let i = 0; i < lines.length; i++) {
    if (i === 0) {
      [n, m] = lines[i].split(" ");
      d = new WeightedDisjointSet();
      for (let i = 0; i < n; i++) {
        d.add(i);
      }
    } else {
      const [x, y, w] = lines[i].split(" ").map((v) => parseInt(v));
      d.merge(x - 1, y - 1, w);
    }
  }
} catch (err) {
  console.log("No");
  return;
}
console.log("Yes");


const main = (input) => {
  input = input.split('\n');
  const X = parseInt(input[0], 10);
  const A = parseInt(input[1], 10);
  const B = parseInt(input[2], 10);

  console.log((X-A)/B);

}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


x=int(input())
r=int(x**0.5)
a=1
for b in range(r+1):
    for p in range(10):
        if b**p <=x :
            a=max(a,b**p)
        else:
            break
print(a)


X = int(input())
upper = int(X**0.5//1)+1
max = 0
for x in range(1,upper):
  for i in range(9):
    if max < x**(i+1) <= X:
      max = x ** (i+1)
print(max)


x=int(input())
i,j=2,1
ans=[]
if x==1:
    print(1)
    quit()
while True:
    j+=1
    if i**j>x:
        i+=1
        j=2
        if i**j>x:
            break
    ans.append(i**j)
print(max(ans))


x=int(input())
res=0
for b in range(x):
    for p in range(2,x):
        if res<(b**p)<=x:
            res=b**p
        elif b**p>x:
            break
print(res)


x = int(input())
ans = 0
for i in range(x+1):
    for j in range(2,x+1):
        if i**j <=x:
            ans = max(ans,i**j)
print(ans)


import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 6)
mod = 10**9+7
cnt = 0
ans = 0
num = []
inf = float("inf")
al = "abcdefghijklmnopqrstuvwxyz"
AL = al.upper()

x = k()

for i in range(x+1):
    if i**2<=x:
        ans = i

print(ans**2)


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());
		List<Integer> list = new ArrayList<>();
		list.add(1);
		for (int i = 2; i <= 33; ++i) {
			int base = i;
			int val = i * i;
			while (val <= X) {
				list.add(val);
				val *= base;
			}
		}
		Collections.sort(list);
		Collections.reverse(list);
		for (int i = 0; i < list.size(); ++i) {
			if (list.get(i) <= X) {
				System.out.println(list.get(i));
				return;
			}
		}
	}

	void calc() {
	}

	void showResult() {
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main
{

  public static void main(String[] args) throws IOException
  {
    BufferedReader r = new BufferedReader(new InputStreamReader(System.in), 1);

    String s;
    String sl[];
    s = r.readLine();
    sl = s.split(" ");

    int v[] = new int[1234];

    int x = Integer.parseInt(sl[0]);

    v[1] = 1;
    for(int i = 2; i <= 1000; i++)
    {
      for(int j = i * i; j <= 1000; j *= i)
      {
        v[j] = 1;
      }
    }

    for(int i = x; ; i--)
    {
      if(v[i] == 1)
      {
        System.out.println(i);
        System.exit(0);
      }
    }

  }

}


import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Set;

public class Main {

    public static void main(String[] args) throws IOException {
        try (InputReader reader = new InputReader(System.in)) {
            solve(reader);
        }
    }

    private static void solve(InputReader reader) throws IOException {
        int x = reader.readInt();
        boolean[] map = new boolean[10001];
        map[1] = true;

        for (int i = 2; i <= 100; i++) {
            for (int j = 2; (int)Math.pow(i, j) <= 1000; j++) {
                int a = (int)Math.pow(i, j);
                map[a] = true;
            }
        }

        for (int i = x; i >= 0; i--) {
            if (map[i]) {
                System.out.println(i);
                return;
            }
        }
    }
}

class Util {
    static int gcd(int m, int n) {
        int min = Math.min(m, n);
        int max = Math.max(m, n);
        while (min != 0) {
            int tmp = min;
            min = max % tmp;
            max = tmp;
        }

        return max;
    }

    static int lcm(int m, int n) {
        return m / gcd(m, n) * n;
    }
}

class InputReader implements Closeable, AutoCloseable {
    private final BufferedReader br;

    InputReader(InputStream inputStream) {
        this.br = new BufferedReader(new InputStreamReader(inputStream));
    }

    String readLine() throws IOException {
        return this.br.readLine();
    }

    int readInt() throws IOException {
        return Integer.parseInt(this.readLine());
    }

    long readLong() throws IOException {
        return Long.parseLong(this.readLine());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(this.readLine());
    }

    String[] readStringsSplitByDelimiter(String delimiter) throws IOException {
        return this.readLine().split(delimiter);
    }

    int[] readIntsSplitByDelimiter(String delimiter) throws IOException {
        String[] strings = this.readStringsSplitByDelimiter(delimiter);

        int stringsLength = strings.length;
        int[] ints = new int[stringsLength];
        for (int i = 0; i < stringsLength; i++) {
            ints[i] = Integer.parseInt(strings[i]);
        }

        return ints;
    }

    long[] readLongsSplitByDelimiter(String delimiter) throws IOException {
        String[] strings = this.readStringsSplitByDelimiter(delimiter);

        int stringsLength = strings.length;
        long[] longs = new long[stringsLength];
        for (int i = 0; i < stringsLength; i++) {
            longs[i] = Long.parseLong(strings[i]);
        }

        return longs;
    }

    double[] readDoublesSplitByDelimiter(String delimiter) throws IOException {
        String[] strings = this.readStringsSplitByDelimiter(delimiter);

        int stringsLength = strings.length;
        double[] doubles = new double[stringsLength];
        for (int i = 0; i < stringsLength; i++) {
            doubles[i] = Double.parseDouble(strings[i]);
        }

        return doubles;
    }

    @Override
    public void close() throws IOException {
        this.br.close();
    }
}


import java.util.*;
import java.io.*;

public class Main {
		public static void main(String[] args) throws IOException {

		// 入出力高速化 java.io.* とthrows IOExceptionを忘れずに
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int[] B = new int[32];
		for(int b=0; b<32; b++){
			B[b]=(b+1)*(b+1);
		}

		int X = Integer.parseInt(br.readLine());
		int ans = 0;
		for(int x=0; x<32; x++){
			if(B[x]>X){
				ans = B[x-1];
				break;
			}
		}

        System.out.println(ans);
    }
}


import java.util.*;
public class Main {

	static void solve() {
		Scanner sc = new Scanner(System.in);
		int k = (int)Math.sqrt(sc.nextDouble());
		System.out.println(k*k);
		sc.close();
	}

	public static void main(String args[]) {
		solve();
	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {
	public static void main(String[] args) {
		FastScanner sc = new FastScanner(System.in);
		double x = sc.nextDouble();
		int ans = 1;
		boolean c = false;
		for(int i = (int)x; i > 0; i--) {
			if(c) break;
			for(int j = 2; j < i; j++) {
				if(Math.log(i)%Math.log(j) == 0) {
					ans = (int)i;
					c = true;
					break;
				}
			}
		}
		System.out.println(ans);
	}

	static class FastScanner {
		private BufferedReader reader = null;
	    private StringTokenizer tokenizer = null;
	    public FastScanner(InputStream in) {
	        reader = new BufferedReader(new InputStreamReader(in));
	        tokenizer = null;
	    }

	    public String next() {
	        if (tokenizer == null || !tokenizer.hasMoreTokens()) {
	            try {
	                tokenizer = new StringTokenizer(reader.readLine());
	            } catch (IOException e) {
	                throw new RuntimeException(e);
	            }
	        }
	        return tokenizer.nextToken();
	    }

	    public String nextLine() {
	        if (tokenizer == null || !tokenizer.hasMoreTokens()) {
	            try {
	                return reader.readLine();
	            } catch (IOException e) {
	                throw new RuntimeException(e);
	            }
	        }

	        return tokenizer.nextToken("\n");
	    }

	    public long nextLong() {
	        return Long.parseLong(next());
	    }

	    public int nextInt() {
	        return Integer.parseInt(next());
	    }

	    public double nextDouble() {
	         return Double.parseDouble(next());
	     }

	    public int[] nextIntArray(int n) {
	        int[] a = new int[n];
	        for (int i = 0; i < n; i++)
	            a[i] = nextInt();
	        return a;
	    }

	    public long[] nextLongArray(int n) {
	        long[] a = new long[n];
	        for (int i = 0; i < n; i++)
	            a[i] = nextLong();
	        return a;
	    }
	}
}


#include <stdio.h>
#include <string.h>

int main(void) {
	int table[1001];
	int x;
	scanf("%d", &x);

	memset(table, 0, sizeof(int) * 1001);
	table[1] = 1;
	for (int i = 2; i <= 1000; i++) {
		if (table[i] == 0) {
			for (int j = i * i; j <= 1000; j *= i) {
				table[j] = 1;
			}
		}
	}

	for (int i = x; i >= 1; i--) {
		if (table[i] == 1) {
			printf("%d\n", i);
			return 0;
		}
	}

	return 0;
}


#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
using namespace std;
int main()
{
	int x;
	cin >> x;
	int ma = 1;
	for (int i = 2; i < x; i++) {
		int a = i*i;
		while (a <= x) {

			ma = max(ma, a);
			a = a * i;
		}
	}
	cout << ma << endl;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define int long long
#define FOR(i, j, k) for(int i = j; i < k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define INF 1e9
#define LINF 1e18

typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<P, int> Pi;
typedef pair<P, P> PP;

const int MOD = 1e9 + 7;
const int dy[]={0, 0, 1, -1};
const int dx[]={1, -1, 0, 0};

template <class T> void chmin(T& a, const T& b) { a = min(a, b); }
template <class T> void chmax(T& a, const T& b) { a = max(a, b); }

signed main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    int X;
    cin >> X;
    int res = 0;
    FOR(i, 1, X + 1) {
        int latte = i;
        FOR(j, 1, X + 1) {
            latte *= i;
            if(latte <= X) chmax(res, latte);
            else break;
        }
    }
    cout << res << endl;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main(){
  int x;
  cin >> x;

  int max = 0, x2 = sqrt(x);
  for (int i=1 ; i<=x2; i++){
    for (int j=2 ; j<=x+1 ; j++){
      max = pow(i, j);
      if (pow(i, j+1) > x)
        break;
    }
  }

  cout << max << endl;
}


#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>;
#define chmax(x,y) x = max(x,y);
#define chmin(x,y) x = min(x,y);
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};
const int INF = 1001001001;

int main() {
    int x;
    cin >> x;
    int ans = 0;
    for (int i = 1; i <= 33; i++) {
        for (int j = i; j <= x; j *= i) {
            ans = max(ans, j);
            if (j == 1) break;
        }
    }
    cout << ans << endl;
    return 0;
}


#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>;
#define chmax(x,y) x = max(x,y);
#define chmin(x,y) x = min(x,y);
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};
const int INF = 1001001001;

int main() {
    int x;
    cin >> x;
    int ans = 0;
    for (int i = 1; i <= 33; i++) {
        for (int j = i; j <= x; j *= i) {
            ans = max(ans, j);
        }
    }
    cout << ans << endl;
    return 0;
}


//set many funcs template
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<stdbool.h>
#include<time.h>
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384

int max(int a,int b){if(a>b){return a;}return b;}
int min(int a,int b){if(a<b){return a;}return b;}
int zt(int a,int b){return max(a,b)-min(a,b);}
int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
int ceil(int a,int b){if(a%b==0){return a/b;}return (a/b)+1;}
int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;}
int lcm(int a,int b){int c=gcd(a,b);a/=c;return a*b;}
int nCr(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;}
int nHr(int a,int b){return nCr(a+b-1,b);}
int fact(int a){int i,r=1;for(i=1;i<=a;i++){r*=i;}return r;}
int pow(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=a;}return r;}
long long llmax(long long a,long long b){if(a>b){return a;}return b;}
long long llmin(long long a,long long b){if(a<b){return a;}return b;}
long long llzt(long long a,long long b){return llmax(a,b)-llmin(a,b);}
long long llround(long long a,long long b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
long long llceil(long long a,long long b){if(a%b==0){return a/b;}return (a/b)+1;}
long long llgcd(long long a,long long b){long long c;while(b!=0){c=a%b;a=b;b=c;}return a;}
long long lllcm(long long a,long long b){long long c=llgcd(a,b);a/=c;return a*b;}
long long llnCr(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;}
long long llnHr(long long a,long long b){return llnCr(a+b-1,b);}
long long llfact(long long a){long long i,r=1;for(i=1;i<=a;i++){r*=i;}return r;}
long long llpow(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=a;}return r;}
double dbmax(double a,double b){if(a>b){return a;}return b;}
double dbmin(double a,double b){if(a<b){return a;}return b;}
double dbzt(double a,double b){return dbmax(a,b)-dbmin(a,b);}
int sortfncsj(const void *a,const void *b){if(*(int *)a>*(int *)b){return 1;}if(*(int *)a==*(int *)b){return 0;}return -1;}
int sortfnckj(const void *a,const void *b){if(*(int *)a<*(int *)b){return 1;}if(*(int *)a==*(int *)b){return 0;}return -1;}
int llsortfncsj(const void *a,const void *b){if(*(long long *)a>*(long long *)b){return 1;}if(*(long long *)a==*(long long *)b){return 0;}return -1;}
int llsortfnckj(const void *a,const void *b){if(*(long long *)a<*(long long *)b){return 1;}if(*(long long *)a==*(long long *)b){return 0;}return -1;}
int dbsortfncsj(const void *a,const void *b){if(*(double *)a>*(double *)b){return 1;}if(*(double *)a==*(double *)b){return 0;}return -1;}
int dbsortfnckj(const void *a,const void *b){if(*(double *)a<*(double *)b){return 1;}if(*(double *)a==*(double *)b){return 0;}return -1;}
int strsortfncsj(const void *a,const void *b){return strcmp((char *)a,(char *)b);}
int strsortfnckj(const void *a,const void *b){return strcmp((char *)b,(char *)a);}

int main(void){
    long long i,j,n,m,k,a[262144],b,c,w,r=0,l,t,x;
    double d;
    char s[262144];
    scanf("%d",&x);
    //l=strlen(s);
    for(i=1;i<=31;i++){
        w=i;
        for(j=2;j<=9;j++){
            w*=i;
            if(w>x){break;}else{r=max(r,w);}
        }
    }
    //qsort(a,n,sizeof(int),sortfncsj);
    printf("%d\n",r);
    return 0;
}


#include<stdio.h>
#include<math.h>
int main(void)
{
    int x,a,b=1,p=2,s,max=0,tmp;
    scanf("%d",&x);
    a=sqrt(x);
    while(b<=a){
        s=b;
        while((s<=x)&&(p<=10)){
            s=s*b;
            p++;
        }
        s=s/b;
        if(max<s){
            tmp=max; max=s; s=tmp;
        }
        b++;
        p=2;
    }
    printf("%d\n",max);
    return 0;
}


#include<stdio.h>
#include<math.h>
int main(){
  int x,i,max=1;
  scanf("%d",&x);
  for(i=2;i<=sqrt(x);i++){
    int a=i*i;
    while(a*i<=x)
      a=a*i;
    if(a>max)
      max=a;
  }
  printf("%d\n",max);
  return 0;
}


#include<stdio.h>
int main(void){
	int x,i,n,max=1;
	scanf("%d",&x);
	for(i=2;i*i<=x;i++){
		n=1;
		while(n*i<x){
			n*=i;
		}
		max=max<n?n:max;
	}
	printf("%d",max);
	return 0;
}


#include<stdio.h>
#include<math.h>
int main()
{
    float a,i;
    int n,k=2,lrg,la=1;
    scanf("%d",&n);

    a=sqrt(n+1);

    for(i=2;i<=a;i++)
    {
        for(k=2;;k++)
        {
        if(pow(i,k)<n){
        lrg=pow(i,k);
                if(lrg>=la)
                la=lrg;
               }
        else
            break;
         }
    }

    printf("%d",la);
}


#include <stdio.h>
#include <math.h>

int main()
{
	int n;
	int i = 1, count = 1;
	scanf("%d", &n);

	while (pow(count,2) <= n) {
		i = pow(count, 2);
		count++;
	}

	printf("%d\n", i);

	return 0;
}


function myin(){return require("fs").readFileSync("/dev/stdin", "utf8").trim();}
function myout(t){console.log(t);}//standard output
function myerr(t){console.error(t);}//standard error
//[no]param
//0:何もしない  1:数値へ変換  2:半角SPで分割  3:改行で分割  4:半角SPで分割し、数値配列へ
//5:改行で分割し、数値配列へ  6:1文字に分割  7:1文字に分割し、数値配列へ
function myconv(i,no){switch(no){case 0:return i;case 1:return parseInt(i);case 2:return i.split(" ");case 3:return i.split("\n");case 4:return i.split(" ").map((a)=>Number(a));case 5:return i.split("\n").map((a)=>Number(a));case 6:return i.split("");case 7:return i.split("").map((a)=>Number(a));}}
function Main(input) {
  input = myconv(input,1);
  var set = new Set();
  set.add(1);
  for(var i = 2; i <= Math.sqrt(input); i++){
    var tmp = i;
    while(tmp <= input){
       set.add(tmp);
      tmp *= i;
    }
  }
  while(true){
     if(set.has(input)){
        myout(input);
       return;
     }else{
       input--;
     }
  }

}
Main(myin());


'use strict'

const main = (input) => {
    const X = parseInt(input)
    let ans = 1
    for(let b = 1; b <= X; b++){
        for(let p = 2; p <= X; p++){
            let pow = Math.pow(b, p)
            if(pow > X) break
            if(pow > ans){
                ans = pow
            }
        }
    }
    console.log(ans)
}

main(require('fs').readFileSync('/dev/stdin', 'utf-8'))


var main = function(input) {
  var X = parseInt(input);
  var max = 0;
  var I;
  for(var b=1;b<=X;b++){
    for(var p=2;p<10;p++){
    I = Math.pow(b,p);
      if(X<I){
        break;
      }
      if(max<I){
      max = I;
      }
    }
  }
  console.log(max);
  return　 0;
}

main(require("fs").readFileSync("/dev/stdin", "utf8").trim());


const main = stdin => {
  const input = stdin.trim().split('\n')
  const [X] = input[0].split(' ').map(x => parseInt(x))

  for (let i = X; i >= 1; i--) {
    if (Math.sqrt(i) % 1 === 0) {
      console.log(i)
      break
    }
  }
}

// 標準入力
main(require("fs").readFileSync("/dev/stdin", "utf8"))


'use strict';
function Main(input) {
	input = parseInt(input.trim());
	if(input<1){
      return;
    }
  	for(let i = input; i > 0; i--){
    	if(Math.sqrt(i)%1===0){
          console.log('%d',i);
          return;
        }
    }
}

//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


'use strict';
function Main(input) {
	input = parseInt(input.trim());

  	for(let i = input; i > 0; i--){
    	if(Math.sqrt(i)%1===0){
          console.log('%d',i);
          return;
        }
    }
}

//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


package main

import (
	"fmt"
	"math"
)

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

	ans := 1
	for i := 2; i*i <= x; i++ {
		for j := 2; ; j++ {
			e := int(math.Pow(float64(i), float64(j)))
			if e <= x {
				ans = max(ans, e)
			} else {
				break
			}
		}
	}
	fmt.Println(ans)
}

func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}


package main

import (
	"fmt"
	"math"
)

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

	result := 1
	for i := 2; i < x; i++ {
		for j := 2; j < x; j++ {
			now := int(math.Pow(float64(i), float64(j)))
			if now > x {
				break
			} else if result < now {
				result = now
			}
		}
	}

	fmt.Println(result)
}


package main

import (
	"bufio"
	"bytes"
	"fmt"
	"io"
	"os"
	"strconv"
)

var DEBUG = true

func main() {
	defer Flush()

	m := make([]bool, 1001)
	m[1] = true

	for i := 2; i <= 1000; i++ {
		k := i * i
		for k <= 1000 {
			m[k] = true
			k *= i
		}
	}

	X := readi()
	for i := X; 0 <= i; i-- {
		if m[i] {
			println(i)
			return
		}
	}

}

// -----------------------------------------------------------------------------

// IO helper functions

// Returns next token from input.  It must be initialized by SetInput()
// before the first call.
var nextToken func() ([]byte, error)
var nextLine func() ([]byte, error)

// Holds a buffer for output.  It must be initialized by SetOutput().
// All IO fucntions (read*() and [e]print*()) should write to OutputWriter
// instead of this.
var OutputBuffer *bufio.Writer

// Holds an io.Writer.  It must be initialized by SetOutput()
var OutputWriter io.Writer

// Set IO functions for interactive input/output.
func SetInteractive(w io.Writer, r io.Reader) {
	SetUnbefferedInput(r)
	OutputBuffer = nil
	OutputWriter = w
}

// Setup OutputBuffer and OutputWriter.
func SetOutput(w io.Writer) {
	OutputBuffer = bufio.NewWriter(w)
	OutputWriter = OutputBuffer
}

// Flushes OutputBuffer
func Flush() {
	if OutputBuffer != nil {
		OutputBuffer.Flush()
	}
}

// Returns true if c is a white space
func IsSpace(c byte) bool {
	switch c {
	case '\t', '\n', '\v', '\f', '\r', ' ':
		return true
	}
	return false
}

func IsNewLine(c byte) bool {
	switch c {
	case '\n', '\r':
		return true
	}
	return false
}

// Setup nextToken with input buffer.
func SetInput(r io.Reader) {
	buf := new(bytes.Buffer)
	var b []byte

	var i int
	rest := func() ([]byte, error) {
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		if i == len(b) {
			return nil, io.ErrUnexpectedEOF
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		return b[j:i], nil
	}
	initial := func() ([]byte, error) {
		io.Copy(buf, r)
		b = buf.Bytes()
		nextToken = rest
		return rest()
	}
	nextToken = initial

	restLn := func() ([]byte, error) {
		for i < len(b) && IsNewLine(b[i]) {
			i++
		}
		if i == len(b) {
			return nil, io.ErrUnexpectedEOF
		}
		j := i
		for i < len(b) && !IsNewLine(b[i]) {
			i++
		}
		return b[j:i], nil
	}

	initialLn := func() ([]byte, error) {
		io.Copy(buf, r)
		b = buf.Bytes()
		nextLine = restLn
		return restLn()
	}
	nextLine = initialLn
}

// Setup nextToken without input buffer.
func SetUnbefferedInput(r io.Reader) {
	buf := bufio.NewReader(r)
	var b []byte

	var i int
	nextToken = func() ([]byte, error) {
		var err error
		if i == len(b) {
			b, err = buf.ReadBytes('\n')
			if err != nil {
				return nil, err
			}
			i = 0
			j := len(b) - 1
			for 0 <= j && IsSpace(b[j]) {
				j--
			}
			b = b[0 : j+1]
		}
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		if i == j {
			return nil, io.ErrUnexpectedEOF
		}
		return b[j:i], nil
	}
}

// -----------------------------------------------------------------------------

// IO functions

// Reads next token and return it as []byte
func readb() []byte {
	b, err := nextToken()
	if err != nil {
		panic(err)
	}
	return b[:len(b):len(b)]
}

// Reads next token and return it as string
func reads() string {
	return string(readb())
}

// Read next line as []byte.  Trailing '\n' will not be included.
// See also comments on readb()
func readbln() []byte {
	b, err := nextLine()
	if err != nil {
		panic(err)
	}
	return b[:len(b):len(b)]
}

// Read next line as string
func readsln() string {
	return string(readbln())
}

// Reads next token and return it as int64
func readll() int64 {
	i, err := strconv.ParseInt(reads(), 10, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// Reads next token and return it as int
func readi() int {
	return int(readll())
}

// Reads next token and return it as float64
func readf() float64 {
	f, err := strconv.ParseFloat(reads(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// Write args to OutputWriter with the format f
func printf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(OutputWriter, f, args...)
}

// Write args to OutputWriter without format
func println(args ...interface{}) (int, error) {
	return fmt.Fprintln(OutputWriter, args...)
}

// Write args to stderr with the format f
func eprintf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(os.Stderr, f, args...)
}

// Write args to stderr without format
func eprintln(args ...interface{}) (int, error) {
	return fmt.Fprintln(os.Stderr, args...)
}

func dbgf(f string, args ...interface{}) {
	if !DEBUG {
		return
	}
	fmt.Fprintf(os.Stderr, f, args...)
}

func dbg(args ...interface{}) {
	if !DEBUG {
		return
	}
	fmt.Fprintln(os.Stderr, args...)
}

// -----------------------------------------------------------------------------

// Utilities

func sumSlice(a []int) int {
	var res int
	for _, v := range a {
		res += v
	}
	return res
}

func sumSlicell(a []int64) int64 {
	var res int64
	for _, v := range a {
		res += v
	}
	return res
}

func readInts(N int) (int, []int) {
	if N == 0 {
		N = readi()
	}
	a := make([]int, N)
	for i := range a {
		a[i] = readi()
	}
	return N, a
}

func readIntsll(N int) (int, []int64) {
	if N == 0 {
		N = readi()
	}
	a := make([]int64, N)
	for i := range a {
		a[i] = readll()
	}
	return N, a
}

// -----------------------------------------------------------------------------

// Simple math functions

const (
	// big prime
	INF  = 1000000007
	INF2 = 1000000009
	INF3 = 998244353
)

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func minll(a, b int64) int64 {
	if a < b {
		return a
	}
	return b
}

func minf(a, b float64) float64 {
	if a < b {
		return a
	}
	return b
}

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

func maxll(a, b int64) int64 {
	if a < b {
		return b
	}
	return a
}

func maxf(a, b float64) float64 {
	if a < b {
		return b
	}
	return a
}

func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

func absll(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

func absf(a float64) float64 {
	if a < 0 {
		return -a
	}
	return a
}

// egcd(a, b) returns d, x, y:
//   d is gcd(a,b)
//   x, y are  integers that satisfy ax + by = d
func egcd(a, b int) (int, int, int) {
	if b == 0 {
		return a, 1, 0
	}
	d, x, y := egcd(b, a%b)
	return d, y, x - a/b*y
}

func egcdll(a, b int64) (int64, int64, int64) {
	if b == 0 {
		return a, 1, 0
	}
	d, x, y := egcdll(b, a%b)
	return d, y, x - a/b*y
}

func gcd(a, b int) int {
	d, _, _ := egcd(a, b)
	return d
}

func gcdll(a, b int64) int64 {
	d, _, _ := egcdll(a, b)
	return d
}

// set up IO functions
func init() {
	// for non-interactive
	SetInput(os.Stdin)
	SetOutput(os.Stdout)

	// Enable below when interactive.  Its ok to leave above intact.
	// SetInteractive(os.Stdout, os.Stdin)
}


package main

import (
	"fmt"
	"math"
)

func main() {
	// Code for B - Exponential
	var X int
	fmt.Scanf("%d", &X)

	for i := X; 0 < i; i-- {
		temp := math.Sqrt(float64(i))
		if math.Round(temp) == temp {
			fmt.Println(i)
			break
		}
	}
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func solve(sc *scanner, wr *bufio.Writer) {
	x := sc.getInt()

	ans := 1
	for i := 2; i*i <= x; i++ {
		j := i
		for j*i <= x {
			j *= i
		}
		ans = j
	}
	fmt.Fprintln(wr, ans)
}

func main() {
	sc := newScanner()
	wr := bufio.NewWriter(os.Stdout)
	maxBufSize := int(1e8)
	sc.Buffer(make([]byte, 4096), maxBufSize)
	sc.Split(bufio.ScanWords)

	solve(sc, wr)
	wr.Flush()
}

// input ------------------------
type scanner struct {
	*bufio.Scanner
}

func newScanner() *scanner {
	sc := bufio.NewScanner(os.Stdin)
	return &scanner{sc}
}
func (sc *scanner) getInt() int {
	sc.Scan()
	ret, err := strconv.Atoi(sc.Text())
	if err != nil {
		panic(err)
	}
	return ret
}
func (sc *scanner) getInt2() (int, int) {
	return sc.getInt(), sc.getInt()
}
func (sc *scanner) getInt3() (int, int, int) {
	return sc.getInt(), sc.getInt(), sc.getInt()
}
func (sc *scanner) getInt4() (int, int, int, int) {
	return sc.getInt(), sc.getInt(), sc.getInt(), sc.getInt()
}
func (sc *scanner) getInts(n int) []int {
	ret := make([]int, n)
	for i := range ret {
		ret[i] = sc.getInt()
	}
	return ret
}
func (sc *scanner) getString() string {
	sc.Scan()
	return sc.Text()
}
func (sc *scanner) getRunes() []rune {
	return []rune(sc.getString())
}
func (sc *scanner) getFloat() float64 {
	sc.Scan()
	ret, err := strconv.ParseFloat(sc.Text(), 64)
	if err != nil {
		panic(err)
	}
	return ret
}
func (sc *scanner) getFloats(n int) []float64 {
	ret := make([]float64, n)
	for i := range ret {
		ret[i] = sc.getFloat()
	}
	return ret
}

// math ----------------------------
func sum(ns ...int) int {
	var sum int
	for _, n := range ns {
		sum += n
	}
	return sum
}

func max(ns ...int) int {
	max := ns[0]
	for i := 1; i < len(ns); i++ {
		if max < ns[i] {
			max = ns[i]
		}
	}
	return max
}

func min(ns ...int) int {
	min := ns[0]
	for i := 1; i < len(ns); i++ {
		if min > ns[i] {
			min = ns[i]
		}
	}
	return min
}

func pow(a, b int) int {
	ret := 1
	for b > 0 {
		if b&1 > 0 {
			ret = ret * a
		}
		a = a * a
		b >>= 1
	}
	return ret
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func solve(sc *scanner, wr *bufio.Writer) {
	x := sc.getInt()

	var ans int
	for i := 1; i <= x; i++ {
		if i*i > x {
			break
		}
		ans = i * i
	}
	fmt.Fprintln(wr, ans)
}

func main() {
	sc := newScanner()
	wr := bufio.NewWriter(os.Stdout)
	maxBufSize := int(1e8)
	sc.Buffer(make([]byte, 4096), maxBufSize)
	sc.Split(bufio.ScanWords)

	solve(sc, wr)
	wr.Flush()
}

// input ------------------------
type scanner struct {
	*bufio.Scanner
}

func newScanner() *scanner {
	sc := bufio.NewScanner(os.Stdin)
	return &scanner{sc}
}
func (sc *scanner) getInt() int {
	sc.Scan()
	ret, err := strconv.Atoi(sc.Text())
	if err != nil {
		panic(err)
	}
	return ret
}
func (sc *scanner) getInt2() (int, int) {
	return sc.getInt(), sc.getInt()
}
func (sc *scanner) getInt3() (int, int, int) {
	return sc.getInt(), sc.getInt(), sc.getInt()
}
func (sc *scanner) getInt4() (int, int, int, int) {
	return sc.getInt(), sc.getInt(), sc.getInt(), sc.getInt()
}
func (sc *scanner) getInts(n int) []int {
	ret := make([]int, n)
	for i := range ret {
		ret[i] = sc.getInt()
	}
	return ret
}
func (sc *scanner) getString() string {
	sc.Scan()
	return sc.Text()
}
func (sc *scanner) getRunes() []rune {
	return []rune(sc.getString())
}
func (sc *scanner) getFloat() float64 {
	sc.Scan()
	ret, err := strconv.ParseFloat(sc.Text(), 64)
	if err != nil {
		panic(err)
	}
	return ret
}
func (sc *scanner) getFloats(n int) []float64 {
	ret := make([]float64, n)
	for i := range ret {
		ret[i] = sc.getFloat()
	}
	return ret
}

// math ----------------------------
func sum(ns ...int) int {
	var sum int
	for _, n := range ns {
		sum += n
	}
	return sum
}

func max(ns ...int) int {
	max := ns[0]
	for i := 1; i < len(ns); i++ {
		if max < ns[i] {
			max = ns[i]
		}
	}
	return max
}

func min(ns ...int) int {
	min := ns[0]
	for i := 1; i < len(ns); i++ {
		if min > ns[i] {
			min = ns[i]
		}
	}
	return min
}

func pow(a, b int) int {
	ret := 1
	for b > 0 {
		if b&1 > 0 {
			ret = ret * a
		}
		a = a * a
		b >>= 1
	}
	return ret
}


Dic = [1000, 961, 900, 841, 784, 729, 676, 625, 576, 529, 512, 484, 441, 400, 361, 343, 324, 289, 256, 243, 225, 216, 196, 169, 144, 128, 125, 121, 100, 81, 64, 49, 36, 32, 27, 25, 16, 9, 8, 4, 1]
x = gets.to_i
puts Dic.bsearch{|y| y <= x}


X = gets.to_i

x = Math.log(X+0.5)
ans = []
(2..10).each{|i|
  wk = Math.exp(x / i.to_f).floor
  (ans << 1; break) if wk < 2
  ans << wk ** i
}

puts ans.max


x = gets.to_i

result = 0

(1 .. 32).each{ |i|
	(2 .. 10).each{ |j|
		temp = i ** j
		if result < temp && temp <= x then
			result = temp
		end
	}
}

puts result


X = gets.to_i

max = 0

1.upto(X) do |i|
  2.upto(X) do |j|
    y = i ** j
    break if  X < y
    max = y if max < y
  end
end

puts max


require "prime"
x = gets.chomp.to_i
ans = 1

(x+1).times do |i|
    next if i == 0
    res = Prime.prime_division(i)
    ans = ans < i ? i : ans if res.size == 1 && res[0][1] >= 2
end
puts ans


x = gets.to_i
ans = nil
(1..32).each do |i|
  if i**2 <= x
    ans = i**2
  else
    puts ans
    exit
  end
end


#![allow(unused_imports)]

use std::cmp::{max, min};
use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet, VecDeque};
use std::io::stdin;
use std::str::FromStr;

fn main() {
    let x: usize = input().unwrap();
    let mut ans = 1;
    for b in 2usize..40 {
        let m = (2..).map(|p| b.pow(p)).take_while(|a| *a <= x).last().unwrap_or(1);
        ans = max(ans, m);
    }

    println!("{}", ans);
}

pub fn input<T: FromStr>() -> Result<T, T::Err> {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    Ok(buf.trim().parse().ok().unwrap())
}

pub fn input_vec<T: FromStr>() -> Result<Vec<T>, T::Err> {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    Ok(buf
        .trim()
        .split_whitespace()
        .map(|x| x.parse().ok().unwrap())
        .collect::<Vec<_>>())
}

pub fn input_two<T: FromStr, U: FromStr>() -> (T, U) {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    let s: Vec<&str> = buf.split_whitespace().collect();
    (
        s[0].parse::<T>().ok().unwrap(),
        s[1].parse::<U>().ok().unwrap(),
    )
}

pub fn input_three<T: FromStr, U: FromStr, V: FromStr>() -> (T, U, V) {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    let s: Vec<&str> = buf.split_whitespace().collect();
    (
        s[0].parse::<T>().ok().unwrap(),
        s[1].parse::<U>().ok().unwrap(),
        s[2].parse::<V>().ok().unwrap(),
    )
}

pub fn input_four<T: FromStr, U: FromStr, V: FromStr, W: FromStr>() -> (T, U, V, W) {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    let s: Vec<&str> = buf.split_whitespace().collect();
    (
        s[0].parse().ok().unwrap(),
        s[1].parse().ok().unwrap(),
        s[2].parse().ok().unwrap(),
        s[3].parse().ok().unwrap(),
    )
}


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 main() {
    let x: usize = read();
    let mut maxv = 0;
    if x <= 3 {
        println!("{}", 1);
        return;
    }

    for i in 2..x {
        let mut imut = i;

        while imut * i <= x {
            imut *= i;
        }

        if maxv < imut && i != imut {
            maxv = imut;
        }
    }
    println!("{}", maxv);
}


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 mut a:Vec<i32> = Vec::new();
	let mut maxi = 1;
	a.push(1);
	a.push(1);
	for i in 2..x {
		for j in 2.. {
			if i.pow(j) > x {
				break;
			}
			if i.pow(j) > maxi {
				maxi = i.pow(j);
				a.pop();
				a.pop();
				a.push(j as i32);
				a.push(i);
			}
		}
	}
	let b = a.pop().unwrap();
	let p = a.pop().unwrap();
	println!("{}", b.pow(p as u32));
}